AI
-
[SpringAI] Tool Calling (2) - DB 접근AI 2025. 6. 20. 21:50
SpringAI 기술과 LLM을 활용해서 데이터베이스 접근을 해봤습니다.ChatClient(Ollama) + LLM(llama 3.2) + SpringAI Tool로 구성했습니다. 사용자 더미데이터 application.propertiesspring.application.name=ai-dataaccessspring.ai.ollama.base-url=http://localhost:11434spring.ai.ollama.chat.model=llama3.2spring.datasource.driver-class-name=net.sf.log4jdbc.sql.jdbcapi.DriverSpyspring.datasource.url=jdbc:log4jdbc:mysql://127.0.0.1:3306/test_dbsprin..
-
[SpringAI] Tool Calling (1)AI 2025. 5. 24. 16:31
Tool이란?LLM은 학습 후 동결되어 오래된 정보를 가지고 있으며, 데이터베이스, 파일 시스템 등 외부 데이터에 접근하거나 수정할 수가 없습니다. Tool calling 메커니즘은 그런 문제점을 해결하도록 도와줍니다. 자체 서비스를 Tool로 등록하여 LLM을 외부 시스템(API, 표준 기능 등)에 연결할 수 있습니다. 메서드 Tool메서드에 어노테이션을 달아서 Tool로 바꿀 수 있습니다.class MyTools { @Tool(description = "") void test(@ToolParam(description = "") String ) { }}@Toolname: Tool 이름. 지정하지 않으면 메서드 이름이 사용됨. AI 모델은 Tool을 호출할 때 name 값..
-
[SpringAI] 간단한 Ollama 채팅 클라이언트 만들기AI 2025. 5. 22. 21:52
Ollama 및 LLM 설치https://yeolmok.tistory.com/47 참고하시면 됩니다. Springboot 프로젝트 코드build.gradleplugins { id 'java' id 'org.springframework.boot' version '3.4.5' id 'io.spring.dependency-management' version '1.1.7'}dependencies { implementation 'org.springframework.ai:spring-ai-starter-model-ollama' testImplementation 'org.springframework.boot:spring-boot-starter-test' testRuntimeOnly '..
-
Ollama 설치 및 실행AI 2025. 5. 16. 21:19
Ollama는 DeepSeek, Qwen, Llama, Gemma 등의 LLM(Large Language Model)을 로컬에서 실행할 수 있도록 해줍니다. 따라서 LLM 설치 이후에는 네트워크 연결 없이 실행할 수 있으며 개인 정보, 사내 기밀 등 민감한 정보를 로컬에서 안전하게 처리할 수 있습니다.Ollama 설치https://ollama.com/ OllamaGet up and running with large language models.ollama.com CLI에서 Ollama 버전 확인ollama -vollama version is 0.7.0 CLI에서 Ollama 모델 리스트 확인ollama listNAME ID SIZE MODIFIED..