This change updates the type of portable chat options from Float to
Double. Affected options include:
- frequencyPenalty
- presencePenalty
- temperature
- topP
The motivation for this change is to simplify coding. In Java, Float
values require an "f" suffix (e.g., 0.5f), while Double values don't
need any suffix. This makes Double easier to type and reduces
potential errors from forgetting the "f" suffix.
APIs, tests, and documentation have been updated to reflect this
change.
Fixes gh-712
Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
- Add web search mode response in choice.message for enhanced
compatibility
- Implement web search mode for stream mode
- Add comprehensive unit tests for new features
Related to #1292
feat: enhance the compatibility of the minimax model and tests, related issue #1292
Apply batching when adding Documents to the following vector stores:
- Chroma
- ElasticSearch
- Neo4j
- Qdrant
- Redis
- Typesense
- Weaviate
This improves efficiency by processing multiple Documents at once instead of individually, reducing the overhead for each operation.
Related to #1261
Refactoring and enhancements to the advisor functionality.
New Advisor interfaces in the org.springframework.ai.chat.client.advisor.api package:
- Advisor: Base interface for all advisor types.
- RequestAdvisor: For advising on request data before execution.
- ResponseAdvisor: For advising on response data after execution, with enhanced streaming modes.
- CallAroundAdvisor and StreamAroundAdvisor: For around advice on synchronous and streaming requests respectively.
- AroundAdvisorChain and DefaultAroundAdvisorChain: To manage chaining of around advisors.
Advisor Chain and Prompt Generation:
- Added the DefaultAroundAdvisorChain class to manage the sequence of advisors applied around chat model methods.
- Adjusted the prompt generation (toPrompt) to integrate with the refactored AdvisedRequest object.
Refactoring and Updates:
- Replaced the deprecated RequestResponseAdvisor interface with RequestAdvisor and ResponseAdvisor across the spring-ai-core and test modules.
- Updated the DefaultChatClient and related classes to use the new Advisor interface, improving modularity and consistency.
- Refactored DefaultAdvisorSpec and DefaultChatClientRequestSpec to handle the new Advisor type, and revised advisor lists and methods accordingly.
- Enhanced the handling of streaming responses, introducing StreamResponseMode for better control during streaming scenarios.
- Precompute all embeddings using a BatchingStrategy before inserting into the vector store
This optimization improves efficiency when adding multiple documents
Related to #1261
- Precompute document token counts before batching into List<List<Document>>
- Introduce configurable reserve percentage for max input token count
Resolves#1260
* Fixes an issue with advisor name resolution
* Streamlines repeating code
* Add a new advisor strategy for ON_FINISH_REASON streaming responses, which is used by the Q&A advisor
* Improve observable instrumentation by passing the parent observation to the advisor observation
* Improve syntax and grammar
* Fix examples using latest APIs
* Add missing info about newer features
Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
Implement web search functionality for the MiniMax model.
Includes unit tests
This enhancement expands the model's ability to access and utilize current information from the internet.
Resolves#1245
Implement function call capability for MiniMax model and add unit tests based on new tool classes.
Address most scenarios, but note limitations in complex English contexts
with multiple function calls. Weather query example: may stop
prematurely when querying multiple locations due to single-location
parameter limit. This behavior stems from model performance constraints.
Streaming function calling is not passing tests, will be address seperately.
Resolves#1077
Implement function call capability for the Moonshot model. Include unit
tests to verify the new functionality. This feature addresses the
requirements outlined in issue #1058.
fix: MiniMax function call
review
Resolve issue with AzureOpenAiChatModel processing non-public images as
byte arrays. Implement handling for both URL strings and byte arrays,
converting latter to base64 encoded data URLs. Add test case for
resource-based media data. Update documentation with sample for
classpath resources.
This commit introduces the OpenAiModerationModel and related classes:
- Add OpenAiModerationModel for content moderation
- Create OpenAiModerationOptions for configuration
- Implement OpenAiModerationProperties for Spring Boot setup
- Add integration tests in OpenAiModerationModelIT
- Add documentation
Co-authored-by: hemeda3 <hemeda3@users.noreply.github.com>
This commit introduces a new Markdown document reader with several
key features and improvements:
* Add support for text with various formatting elements
* Implement handling for horizontal rules and hard line breaks
* Add functionality for inline and block code sections
* Incorporate blockquote handling
* Support ordered and unordered lists
* Introduce additional metadata capabilities
* Include JavaDocs
Update ETL documentation to reflect these new features and usage.
Fixes#105
Currently this is a PreProvisionedService with a secret derived from the TPCF service key.
Signed-off-by: Stuart Charlton <stuart.charlton@broadcom.com>
- Based on the pattern established in other vector store support implementations,
added a builder class as an inner class of the GemfireVectorStoreConfig class which
is also moved as an inner class to GemfireVectorStore.
Based on the original PR: https://github.com/spring-projects/spring-ai/pull/1168