1.레포지토리 추가
repositories {
mavenCentral()
maven { url 'https://repo.spring.io/milestone' }//ai 디펜던시 조회장소 추가
}
maven { url 'https://repo.spring.io/milestone' } 만 추가(mavenCentral()은 원래있을거임)
2.버전변수추가(안하고 그냥 바로 적어도되긴함
ext {
set('springAiVersion', "1.0.0-M1")//밑에서 사용할 버전 변수
}
추가
3.bom추가
dependencyManagement {
imports {
mavenBom "org.springframework.ai:spring-ai-bom:${springAiVersion}"
}
}
통째로 추가하면됨(이미 dependencyManagement가 있으면 거기 넣고)
4.의존성추가
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'com.fasterxml.jackson.module:jackson-module-kotlin'
implementation 'org.jetbrains.kotlin:kotlin-reflect'
runtimeOnly 'com.h2database:h2'
runtimeOnly 'com.mysql:mysql-connector-j'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.jetbrains.kotlin:kotlin-test-junit5'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
//ai
implementation 'org.springframework.ai:spring-ai-openai-spring-boot-starter' //이거 추가
}
implementation 'org.springframework.ai:spring-ai-openai-spring-boot-starter' 추가(이건 openAi꺼,각 벤더별로 다르게 추가하면됨)
밴더별 이름은
https://docs.spring.io/spring-ai/reference/api/chat/openai-chat.html
OpenAI Chat :: Spring AI Reference
Multimodality refers to a model’s ability to simultaneously understand and process information from various sources, including text, images, audio, and other data formats. Presently, the OpenAI gpt-4o and gpt-4o-mini models offers multimodal support. Ref
docs.spring.io
왼쪽의 회사별 목록 들어가서 보면됨
'스프링' 카테고리의 다른 글
spring ai의 openAiChatModel로 Perplexity같은 다른 회사와 통신하기 (0) | 2024.09.24 |
---|---|
스프링 UriComponentsBuilder로 공공데이터포탈 키 인코딩하기 (3) | 2024.09.22 |
[코틀린]Sort객체를 QueryDsl의 OrderSpecifier로 바꿔서 정렬하기(pageable도?) (0) | 2024.04.11 |
스프링 테스트시 application.yaml을 작성했는데 읽지못할때 (0) | 2024.03.22 |
과제 질문했던거 답변 저장 (0) | 2024.03.08 |