- 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.
- provides a flexible schema, can be combined with a vector store, and supports time-to-live rows.
- fix initialize-schema docs and so that it actually works.
- move CommonVectorStoreProperties to .vectorstore. package
- add CassandraAutoConfiguration to the AutoConfiguration.imports
- 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
* 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>
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
In the ImageResponseMetadata interfaces and its implementations, the method 'created' has been renamed to 'getCreated' to support JSON ser/deser
Fixes#625
- add support for custom StructuredOutputConverters usng entity(outputConverterInstance)
- add mutate() method that returns ChatClient.Builder to create a new ChatClient whose
settings are replicated from the ChatClient's default settings.
- add prompt().mutate() method that returns ChatClient.Builder to create a new ChatClient
whose settings are replicated from the current default and prompt settings.
* Move ChatClient and related classes into the chat.client package
* Move ChatModel and related class into the chat.model package
* Smaller refactorings to remove DSM cycles
* Update README.md