* Improve docs for OpenAI, Mistral AI, and Ollama chat models and function calling
* Improve docs for the Chat Client
Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
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>
* 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>
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
* Surface more configuration APIs to ChatOptions
* Use abstraction in Observations directly instead of dedicated implementation
* Simplify metadata config in observations for defined models
* Improve merging of runtime and default options in OpenAI
* Fix missing option in Mistral AI
Relates to gh-1148
Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
- Add `TEXT` to the supported ResponseFormat types
- Add JsonSchema record for structured output configuration
- Update OpenAI chat documentation with details on Structured Outputs
- Clarify usage of JSON_SCHEMA response format in properties and code examples
- Update Structured Output Converter docs to mention OpenAI Structured Outputs
- Added support for OpenAI's structured outputs feature, which allows specifying a JSON schema for the model to match
- Introduced new record to configure the desired response format
- Added support for configuring the response format via application properties or the chat options builder
- Extend teh BeanOutputConverter to help generate JSON schema from a target domain object and convert the response.
- Added comprehensive tests to cover the new response format functionality
Resolves#1196
- Update OllamaEmbeddingModel to support batch embedding requests
- Rename EmbeddingRequest/Response to EmbeddingsRequest/Response
- Add truncate option to control input truncation
- Update documentation and tests for new embedding API
- Remove deprecated withModel and withDefaultOptions methods
- Adjust default values for various Ollama model options
- Include response medata with response model name
Resolves#1158
- Add org-id and project-id properties with unified merging logic
- Update autoconfig and docs for all OpenAI models
- Introduce OpenAiChatOptions#httpHeaders option
- Add integration test for httpHeaders and update docs
Resolves#1141
- 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