spring-petclinic / spring-petclinic-microservices

Distributed version of Spring Petclinic built with Spring Cloud
Apache License 2.0
1.67k stars 2.17k forks source link

Genai Chatbot startup failure #282

Open colljos opened 1 week ago

colljos commented 1 week ago

Followed instructions as per Integrating the Spring AI Chatbot but application fails to start-up with following error:

***************************
APPLICATION FAILED TO START
***************************
Description:
Parameter 2 of method openAiEmbeddingModel in org.springframework.ai.autoconfigure.openai.OpenAiAutoConfiguration required a bean of type 'org.springframework.web.client.RestClient$Builder' that could not be found.
Action:
Consider defining a bean of type 'org.springframework.web.client.RestClient$Builder' in your configuration.

I have attempted to follow the advice in https://github.com/spring-projects/spring-ai/issues/563 and associated https://github.com/spring-projects/spring-ai/issues/524 but issue continues.

colljos commented 1 week ago

Just realised this codebase is not yet merged into the main branch: https://github.com/spring-petclinic/spring-petclinic-microservices/pull/281

@odedia can you comment on the error I am seeing? NB: I am using the Open AI starter: spring-ai-openai-spring-boot-starter (not the Azure default).