Код: Выделить всё
@Bean(name = "openAiBuildClient")
public ChatClient buildClient(
@Qualifier("openAiChatClientBuilder") ChatClient.Builder openAiBuilder,
MessageChatMemoryAdvisor messageChatMemoryAdvisor,
RedisVectorStore redisVectorStore,
PineconeVectorStore pineconeVectorStore
) {
Код: Выделить всё
spring:
application:
name: "my-spring-ai"
ai:
vectorstore:
redis:
index: spring-ai-example
uri: redis://localhost:6379
pinecone:
apiKey: ${PINECONE_API_KEY}
index-name: spring-ai-example
Код: Выделить всё
Description:
Parameter 2 of method buildClient in org.example.config.clients.OpenAIClientConfig required a bean of type 'org.springframework.ai.vectorstore.RedisVectorStore' that could not be found.
The injection point has the following annotations:
- @org.springframework.beans.factory.annotation.Qualifier("openAiBuildClient")
Обновить
Похоже, именно поэтому оно не работает
Код: Выделить всё
RedisVectorStoreAutoConfiguration:
Did not match:
- @ConditionalOnBean (types: org.springframework.data.redis.connection.jedis.JedisConnectionFactory; SearchStrategy: all) did not find any beans of type org.springframework.data.redis.connection.jedis.JedisConnectionFactory (OnBeanCondition)
Matched:
- @ConditionalOnClass found required classes 'redis.clients.jedis.JedisPooled', 'org.springframework.data.redis.connection.jedis.JedisConnectionFactory', 'org.springframework.ai.vectorstore.RedisVectorStore', 'org.springframework.ai.embedding.EmbeddingModel' (OnClassCondition)
Код: Выделить всё
implementation "org.springframework.ai:spring-ai-redis-store-spring-boot-starter:${springAiVersion}"
implementation 'org.springframework.boot:spring-boot-starter-data-redis'
Код: Выделить всё
implementation 'org.springframework.data:spring-data-redis'
Подробнее здесь: https://stackoverflow.com/questions/792 ... -spring-ai
Мобильная версия