- factor out the common funciton calling logic form AnthropicChatModel to the AbstractToolCallSupport.
- improve the AbstractToolCallSupport isToolCall to handle OpenAi and Anthropic.
- fix an issue with the function calling streaming aggreagation leading to lost usage statistics.
- small code improvements for OpenAiChatModel.
- extend the OllamaApi with Tool, ToolCalls and Function and add Tool Role.
- make OllamaChatModel extend the AbstractToolCallSupport.
- extend the OllamaChatModel to convert the Spring AI messages to OllamaApi messages, including Tools.
- OllamaOptions implements FunctionCallingOptions.
- add OllamaApiToolFunctionCallIT for testing function calling.
- patch the AbstractToolCallSupport#isToolCall to take set of stop resons.
- add FunctionCallbackInPromptIT and FunctionCallbackWrapperIT function calling auto-configuration tests.
- extend OllamAutoConfiguration to support function calling registration.
- add function call tests to OllamChatAutoConfigurationIT.
- add OllamaWithOpenAiChatModelIT to OpenAi that uses the OpenAI API to call Ollama.
- move buildToolCallConversation and handleToolCalls to parent AbstractToolCallSupport.
- update Docs. add Ollama function call docs.
- update Ollama diagrams.
Resolves#720
The Lambda functions do not retain the type information, so we need to provide the input type explicitly.
Resolves#1052
Co-authored-by: liuzhifei <2679431923@qq.com>
- Breaking changes: Classes from the org.springframework.ai.openai.metadata.audio.transcription package have been moved to the org.springframework.ai.audio.transcription package.
- The AzureOpenAiAudioTranscriptionModel has been added to the auto-configuration.
- The spring.ai.azure.openai.audio.transcription prefix was introduced for properties.
- Introduces options properties which cover all of them (see: AzureOpenAiAudioTranscriptionOptions).
- fix missing MutableResponseMetadata
- add docs
- adjust code to updated ResponseMetadata design
- add test to AzureOpenAiAutoConfiguration
- add missing AzureOpenAiAudioTranscriptionModel tests
- introduce copy() method to the ChatOptions.
- make sure that the DefaultChatClientRequestSpec takes a copy of the input chat options to prevent multation.
- add a OpenAiChatClientMultipleFunctionCallsIT to reproduce the problem and verify the solution.
Resolves#1064
* Remove inheritance from HashMap
* No more subclasses per model provider
* Builder class for ChatResponse
* Fix the AbstractResponseMetadata#AI_METADATA_STRING parameter order
* ChatResponseMetadata ignore Null values.
- re-assign the model on withSystemInstruction return.
- deprecate the gemini-pro-vision model and replace the default model to gemin-pro-1.5
- update docs.
- improve system message handling implementation.
Resolves#1030
Co-authored-by: Christian Tzolov <ctzolov@vmware.com>
- Moves these from free-text key/value pairs to interface
- Enables programmatic use for evaluation and observability
Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
- Add ToolCall to AssistantMessage.
- Rename FunctionMessage to ToolResponseMessage and add id and name fields.
- Refactor OpenAiChatModel's function calling handling.
- Prompt copy now copies the AssistantMessage and ToolResponseMessage contents.
Other ChatModel implementations to adopt these changes in subsequent commits
- add new spring-ai-vertex-ai-embedding project.
- add VertexAiTextEmbeddingModel and VertexAiMultimodalEmbeddingMode with related options configuration classes.
- add ITs
- add auto-configuraiton and boot starters.
- register to BOM.
- add documentation.
- add multimodal embedding documentation
- extend the Embedding metdata so that it can keep references to the source document's data, Id, mediatype
Resolves#1013
Related to #1009
- add dedicated groq chat page in the documentation.
Explain how to re-configure the OpenAI client for accessing the Groq chat completion endpoint.
- Doc: order the Chat and Embedding items in alphabetical order
- Add Groq ITs.
Resolves#996
- add StreamEven API domain model for reliably parsing stream events.
- add StreamHelper#mergeToolUseEvents to aggregate partial tool use jsons into a list of ContentBlocks.
- add StreamHelper#eventToChatCompletionResponse to convert Flux<StreamEvents> into Flux<ChatCompletionResponse>.
- Rename MediaContent -> ContentBlock, RequestMessage -> AnthropicMessage, ChatCompletion -> ChatCompletionResponse.
- Improve tests and docs.