* Extend ChatResponseMetadata for Anthropic (blocking, streaming)
* Add ChatResponseMetadata for Mistral AI (blocking)
* Extend ChatResponseMetadata for OpenAI (blocking)
* Deprecate gpt-4-vision-preview and replace its usage in tests because OpenAI rejects the calls (see: https://platform.openai.com/docs/deprecations)
Fixes gh-936
Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
- OpenAiApi: add StreamingOptions class and ChatCompletionRequest#streamingOptions field.
- add OpenAiChatOption#withStreamingUsage(boolean) to set/unset the StreamingOptions.
- add a boolean (get/set)StreamUsage() to OpenAiChatOptions that internally set the SstreamOptions.
Later allows the "spring.ai.openai.chat.options.stream-usage" property.
- update the OpenAI property documentation.
Co-authored-by: Christian Tzolov <ctzolov@vmware.com>
- upadate bedrockruntime version to 2.26.7 and align it with aws sdk dependecy.
- minor ITs configuration, consistency and statbility fixes
Use the EnvironmentVariableCredentialsProvider instead of the Profile credential provider.
- update the Bedrock getting started documentation.
- update the Genemi Prerequisites docs.
- Added additional support for ZhiPuAi models including vision model GLM-4V
- Default model changed to GLM_4_Air and update documentation
- Added additional unit and integration tests
- Add documentation for vision model
* Align model naming with Mistral AI documentation
* Add missing model for mixtral 22B
* Deprecate mistral-medium-latest because Mistral will remove it soon
Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
Some LLM providers, such as Groq and OpenRouter, are marketed as OpenAI API compatible.
However, they often lack full support for the API specification.
This PR allows to use the simpler message format if no media artifacts are assigned.
* Added Spring Boot Starter for Spring AI Hugging Face
* Updated documentation with instructions using the starter dependency
* Fixed naming inconsistencies in the docs for Hugging Face
Fixes gh-838
Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
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
* 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