- Rename OllamaChatClient#withOptions(...) method to OllamaChatClient#withDefaultOptions(...)
- Rename OllamaEmbeddingClient#withOptions(...) method to OllamaEmbeddingClient#withDefaultOptions(...)
- Remove the Chat/Embedding Client model field by defaultOptions.mode one.
- Correct default and runtime OllamaOptions merging implemented.
- Added support for portable ChatOptions.
- OllamaOptions a synthetic field ‘model’ not supported by Ollama API but used by the OllamaChatClient
and OllamaEbeddingClients. The model field is removed before calling the OllamaApi.
- Update the IT ollama docker image to 0.1.23
- Set Mistral as the default model.
- Extend and improve the ITs
- Add tests for testing the chat and embedding request creation and options merging logic.
- Minor code-style improvements.
- Split the ollama.adoc into embeddings/ollama-embeddings.addoc and clients/ollama-chat.adoc.
- Improve the documentation to explain how to configure and use the Ollama Chat and Embedding clients manually or with the help of the auto-configuraitons.
- Clarify the docs property sections.
- Now you can use an arbitrary ChatOption instance as Prompt options for the OpenAIChatClinet.
- Add Unit tests for OpenAiApi and ModelOptionsUtils.
- Document portable options support.
Add OpenAiChatOptions
- OpenAiChatOptions implements ChatOptions and exposes all OpenAi request options, except messages and stream.
- Add OpenAiChatOptions field (as defaultOptions) to OpenAiChatClient. Implement star-up/runtime options merging on chat request creation
- Add OpenAiChatOptions options field to OpenAiChatProperties. Later is set as OpenAiChatClient#defaultOptions. Use the spring.ai.openai.chat.options.* prefix to set the options.
- Add tests for properties and options merging.
- Move the OpenAiChatOptions.java out of the api package
Add OpenAiEmbeddingOptions
- Add OpenAiEmbeddingOptions class implementing the EmbeddingOptions interface.
- Add OpenAiEmbeddingClient#defaultOptions
- Add request merging with default and propmt options.
- Add OopenAiEmbeddingProperties#options field of type OpenAiEmbeddingOptions
Update OpenAI client docs
Part of the larger 'epic' issue #228
* An abstract API for AI model clients
* Providing portable client request options while still allowing vendor specific options when required. Implemented only for StabilityAI/OpenAI ImageClient
* Support for text->image for openai and stabilityai.
Partial fix for #27 : Text To Image and Fixes#266 and Fixes#261
Add dedicated property classes for the Chat and the Embedding models and use a common connection properties for both:
- OpenAiConnectionProperties (baseUrl, apiKey) with prefix spring.ai.openai.*.
- OpenAiChatProperties (model, temperature) with prefix spring.ai.openai.chat.
- OpenAiEmbeddingProperties (model) with prefix spring.ai.openai.embedding.*
Additionally the OpenAiChatProperties and OpenAiEmbeddingProperties can optionally override the OpenAiConnectionProperties
so that we can use the Chat model from one Provider and the Embedding model from another.
Resolves#229
Moved up one package level the following classes
* org.springframework.ai.huggingface.client.HuggingfaceChatClient
* org.springframework.ai.openai.client.OpenAiChatClient and org.springframework.ai.openai.embedding.OpenAiEmbeddingClient
* org.springframework.ai.vertex.generation.VertexAiChatClient and org.springframework.ai.vertex.embedding.VertexAiEmbeddingClient
Fixes#211
- fix all class names with AiClient or AiStreamingClient name prefixes.
- fix all variables or method name prefixes.
- fix the javadocs, readmes and refference documentation.
- Added autoconfiguration for Redis vector store
- Added spring boot starter for Redis vector store
- Supports portable metadata filter expressions
Fixes#11
- Add NOT expression type to the portable Filter.Expression model.
- Add NOT to the Antlr grammar and implement the related parser listener method to generate Filter NOT expressions.
- Add NOT support to the filter programming DSL.
- Implement FilterHelper.negation for logically transform any boolean expression with NOT statements into
semantically equivalent one with NOT applied to the leaf expressions.
- Add tests for paresers, converters and vectorsores ITs.
- Move the filter IN/NIN expansion logic to the FilterHelper
- Factor out the filter IN/NIN boolean expression expansion logic out of Weaviate up to the FilterHelper.
- add in/nin expantion FilterHelper tests
- Add Weaviate Vector Store implementation.
- Implement a converter of portable Filter.Expressions into native, Weaviate GraphQL Were expressions.
- Support for Weaviater schema auto-registration of filtarable metadata fields.
- Add auto-configration, spring properties and tests.
- WeaviateVectorStore ITs.
- Add README.md
Resolves#100
* Define GenerationMetadata property in AiResponse.
* Add OpenAI implementations of AiMetadata, RateLimit and Usage interfaces.
* Add REST Assured JsonPath dependency to spring-ai-openai module.
* Add OkHttp dependency to spring-ai-openai module.
* Add OkHttp Interceptor to parse OpenAI rate limit metadata from HTTP headers.
* Add OkHttp MockWebServer dependency to spring-ai-openai module, test scope
* Add Jakarta Servlet API dependency to spring-ai-openai module, test scope
* Add Spring Web MVC dependency to spring-ai-open-ai module., test scope
* Define OpenAI API response headers in an Enum.
* Add OpenAI test configuration using mock objects.
* Add integration test to assert successful extraction of OpenAI API response metadata.
* Include Spring Boot auto-configuration for (conditional) OpenAI metadata collection.
* Edit documentation and include information on AI metadata collected by Spring AI.
* Provide AI metadata implementation for Microsoft Azure OpenAI Service.
* Capture optional PromptMetadata in AiResponse.
* Define metadata for an AI generation choice.
* Capture AI choice metadata in Generation.
* Integrate ChoiceMetadata into AiResponse returned by OpenAI.
Fixes#98
- Collapses all VectorStore similiaritySearch methdos into one with SearchRequest builder.
- Fix all affected code and tests.
- Bump the project version to 0.7.1.
- Add tests
- Add autoconfigurations for milvus, pinecone and pgvecor stores.
- Improve and unify the VectorStore ITs.
- Make use of TrasformersEmbeddingClient for auto-configurations ITs.
* Clean up README.md files in Milvus, PGvector, and Pinecone modules.
* Apply consistent treatment of 'model' when used as an AI concept, e.g. AI model or Embedding model.
* Apply consistent treatment of 'vector store' and 'vector database' references.
* Simplify sentence structures.
Closes#79