Skip to content

Commit

Permalink
feat: spring update
Browse files Browse the repository at this point in the history
  • Loading branch information
Angular2Guy committed Dec 3, 2024
1 parent 3a6a2a1 commit c554516
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
10 changes: 5 additions & 5 deletions backend/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
*/
plugins {
id 'java'
id 'org.springframework.boot' version '3.3.0'
id 'io.spring.dependency-management' version '1.1.4'
id 'org.springframework.boot' version '3.4.0'
id 'io.spring.dependency-management' version '1.1.6'
}

group = 'ch.xxx'
Expand All @@ -37,13 +37,13 @@ dependencies {
implementation 'org.liquibase:liquibase-core'
implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-csv'
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310'
implementation 'net.javacrumbs.shedlock:shedlock-spring:5.2.0'
implementation 'net.javacrumbs.shedlock:shedlock-provider-jdbc-template:5.2.0'
implementation 'net.javacrumbs.shedlock:shedlock-spring:6.0.1'
implementation 'net.javacrumbs.shedlock:shedlock-provider-jdbc-template:6.0.1'
implementation 'org.springframework.ai:spring-ai-pgvector-store-spring-boot-starter:1.0.0-SNAPSHOT'
implementation 'org.springframework.ai:spring-ai-transformers-spring-boot-starter:1.0.0-SNAPSHOT'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.security:spring-security-test'
testImplementation 'com.tngtech.archunit:archunit-junit5:1.1.0'
testImplementation 'com.tngtech.archunit:archunit-junit5:1.3.0'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'

// if(project.hasProperty('useOllama')) {
Expand Down
14 changes: 8 additions & 6 deletions backend/src/main/resources/application-ollama.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
spring.ai.ollama.base-url=${OLLAMA-BASE-URL:http://localhost:11434}
spring.ai.ollama.embedding.enabled=false
spring.ai.embedding.transformer.enabled=true
document-token-limit=150
document-token-limit=9000
embedding-token-limit=500
spring.liquibase.change-log=classpath:/dbchangelog/db.changelog-master-ollama.xml

Expand All @@ -11,7 +11,11 @@ spring.liquibase.change-log=classpath:/dbchangelog/db.changelog-master-ollama.xm

# document processing
# falcon model config free production use
#spring.ai.ollama.chat.model=falcon:40b
#spring.ai.ollama.chat.model=qwen2.5:32b
spring.ai.ollama.chat.model=llama3.1:8b
spring.ai.ollama.chat.options.num-ctx=12288
#spring.ai.embedding.transformer.onnx.modelUri=https://huggingface.co/mixedbread-ai/mxbai-embed-large-v1/tree/main/onnx/model_quantized.onnx
#spring.ai.embedding.transformer.tokenizer.uri=https://huggingface.co/mixedbread-ai/mxbai-embed-large-v1/tree/main/tokenizer.json
# beluga model config only for non production/commercial use
#spring.ai.ollama.chat.model=stable-beluga:13b

Expand All @@ -23,8 +27,6 @@ spring.liquibase.change-log=classpath:/dbchangelog/db.changelog-master-ollama.xm
#spring.ai.ollama.chat.options.num-thread=8
#spring.ai.ollama.chat.options.keep_alive=1s

#spring.ai.ollama.embedding.options.model=mxbai-embed-large:335m #test with Spring AI 1.0

# generate code
#spring.ai.ollama.chat.model=granite-code:20b
#spring.ai.ollama.chat.options.num-ctx=8192
Expand All @@ -35,8 +37,8 @@ spring.liquibase.change-log=classpath:/dbchangelog/db.changelog-master-ollama.xm
#spring.ai.ollama.chat.model=deepseek-coder-v2:16b
#spring.ai.ollama.chat.options.num-ctx=65536

spring.ai.ollama.chat.model=codestral:22b
spring.ai.ollama.chat.options.num-ctx=32768
#spring.ai.ollama.chat.model=codestral:22b
#spring.ai.ollama.chat.options.num-ctx=32768

# generate book summaries
spring.ai.ollama.chat.options.num-thread=8
Expand Down
1 change: 1 addition & 0 deletions runOllama.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ docker exec -it ollama ollama run stable-beluga:13bc
#docker exec -it ollama ollama run llama3.1:70b
#docker exec -it ollama ollama run qwen2.5:32b
#docker exec -it ollama ollama run codestral:22b
#docker exec -it ollama ollama run llama3.1:8b
#docker exec -it ollama bash

0 comments on commit c554516

Please sign in to comment.