vectorstore

This commit is contained in:
2026-02-20 20:01:51 +01:00
parent 30054b4268
commit e4fbc07946
2 changed files with 5 additions and 16 deletions

View File

@@ -74,17 +74,11 @@
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId> <artifactId>spring-boot-starter-web</artifactId>
</dependency> </dependency>
<!-- Changed: spring-ai-starter-model-ollama -> spring-ai-starter-model-openai (Groq-compatible) --> <!-- OpenAI-compatible API: Groq for chat, OpenAI for embedding -->
<dependency> <dependency>
<groupId>org.springframework.ai</groupId> <groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-starter-model-openai</artifactId> <artifactId>spring-ai-starter-model-openai</artifactId>
</dependency> </dependency>
<!-- Local ONNX embedding model (Groq does not provide embedding API) -->
<!-- Default model: all-MiniLM-L6-v2 (384 dimensions) -->
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-starter-model-transformers</artifactId>
</dependency>
<dependency> <dependency>
<groupId>org.springframework.ai</groupId> <groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-starter-model-chat-memory-repository-jdbc</artifactId> <artifactId>spring-ai-starter-model-chat-memory-repository-jdbc</artifactId>
@@ -160,12 +154,6 @@
<groupId>org.springframework.kafka</groupId> <groupId>org.springframework.kafka</groupId>
<artifactId>spring-kafka</artifactId> <artifactId>spring-kafka</artifactId>
</dependency> </dependency>
<dependency>
<groupId>ai.djl.pytorch</groupId>
<artifactId>pytorch-engine</artifactId>
<version>0.32.0</version>
<scope>runtime</scope>
</dependency>
</dependencies> </dependencies>
<dependencyManagement> <dependencyManagement>
<dependencies> <dependencies>

View File

@@ -5,10 +5,11 @@ spring.ai.openai.base-url=${SPRING_AI_OPENAI_BASE_URL:https://api.groq.com/opena
spring.ai.openai.api-key=${SPRING_AI_OPENAI_API_KEY:} spring.ai.openai.api-key=${SPRING_AI_OPENAI_API_KEY:}
spring.ai.openai.chat.model=${SPRING_AI_OPENAI_CHAT_MODEL:llama-3.3-70b-versatile} spring.ai.openai.chat.model=${SPRING_AI_OPENAI_CHAT_MODEL:llama-3.3-70b-versatile}
spring.jpa.hibernate.ddl-auto=update spring.jpa.hibernate.ddl-auto=update
spring.ai.vectorstore.pgvector.dimensions=384
# --- Embedding model: local ONNX (Groq has no embedding API) --- # Embedding via OpenAI API (text-embedding-3-small)
spring.ai.openai.embedding.enabled=false spring.ai.openai.embedding.base-url=https://api.openai.com/v1
spring.ai.openai.embedding.api-key=${OPENAI_API_KEY:}
spring.ai.openai.embedding.options.model=text-embedding-3-small
# --- Consul service discovery --- # --- Consul service discovery ---
spring.cloud.consul.host=${SPRING_CLOUD_CONSUL_HOST:localhost} spring.cloud.consul.host=${SPRING_CLOUD_CONSUL_HOST:localhost}