Enable handling multiple function calls at once.
Change the Gemini model names from preview to gemini-1.5-pro-001 and gemini-1.5-flash-001.
Simplify the Gemini function calling ITs. drop the multi-turn instructions.
- update the Gemini function calling ITs to include a system message with dedicated calling instructions.
- fix a type with few Gemini ChatModel enum names.
- re-enable all Gemini ITs.
- Fix a bug in Azure streaming response. Ensure that the merge functionality resolves the right
object constructors
- drop the @ConditionalOnMissingBean for the ChatClientAutoConfiguration#chatClientBuilder .
If multiple chat model starters are added to the POM this will fail as the ChatClient.Builder
auto-config can handle only one chat model. Then the spring.ai.chat.client.enabled=false must be set.
- Add missing AutoConfiguration imports for SpringAiRetryAutoConfiguration.class, RestClientAutoConfiguration.class,
and WebClientAutoConfiguration.class to the AnthropicAutoConfiguration, MistralAiAutoConfiguration,
OllamaAutoConfiguration,VertexAiPalm2AutoConfiguration.
- change the OpenAi and Azure OpenAi default chat models to gpt-4o
- clean and improve the stability of various ITs
ChatClient already provides the .chatResponse() method to return the entire ChatResponse instance.
It also provides a set of overloaded .entity(Type) methods to provide Type-converted responses.
The new .responseEntity(Type) method returns a ResponseEntity<ChatResponse, T> instance, encapsulating
both the ChatResponse and the requested Type-converted response entity.
This change allows for more flexibility when handling different response types and facilitates
easier integration with other components that expect ResponseEntity instances.
Now the ChatClient contains only the Spec interfaces while
all implementations are moved to the DefaultChatClient
and the DefaultChatModelBuilder classes.
- Add an additional instruction to the format for the model not to include markdown syntax for JSON quotes.
- Extend the conversion to strip markdown quotes in case the model included them in the response
- Add RequestResponseAdvisor interface with adviseReqeust and adviseResponse methods.
The adviseRequest method takes and returns AdvisedRequest.
The adviseResponse method takes and returns ChatRequest.
- Add ChatClient#ChatClientRequets advisor(...) methods to register advisros.
ChatClient call the registered advisors in order before sealing the ChatClientRequest into a Prompt and call the model
and after the model response.
- Implement PromptChatMemoryAdvisor that uses the ChatMemory and the systemem prompt.
- Implement MessageChatMemoryAdvisor that usees the ChatMemory and the prompt messages.
- Implement VectorStoreChatMemoryAdvisor that uses VecrStore for long term message history.
- Add tests.
- Add shared context to the RequestResponseAdvisor's flow, Context is shared between the request and the response
- Add advisor parameters that are passed through the context
* Tests have been updated to use the "gpt-4-turbo" model instead of the "gpt-4-turbo-preview".
* String comparisons of temperature have been adjusted to match the format changes from model reponses