Commit Graph

423 Commits

Author SHA1 Message Date
Thomas Vitale
0ddf331fd4 Improve docs for OpenAI, Mistral AI and Ollama chat models and clients
* 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>
2024-09-17 17:51:02 -04:00
GR
326bd21a09 Minimax doc fixes
- Add web search docs
- Fix minimax chat docs links
2024-09-16 23:38:08 -04:00
Thomas Vitale
4b123a7516 Use Double instead of Float for portable ChatOptions
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>
2024-09-16 15:35:51 -04:00
Laura Trotta
4f62ac1cee GH-1316: Elasticsearch vector store - Wrong error reported fix
Fixes: https://github.com/spring-projects/spring-ai/issues/1316

* Handling missing index case
* Docs update
* User header for observability
* Same exception management for delete
2024-09-09 11:58:29 -04:00
Thomas Vitale
37c34507cf Improve docs for foundational topics (#1279)
* 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>
2024-08-27 16:47:22 -04:00
Mark Pollack
449790f73a Update to Boot 3.3.3
Add to docs that spring ai supports 3.2.x and 3.3.x
2024-08-23 12:37:01 -04:00
Szymon Ochnio
197fe8105c Fix Azure chat client image handling for byte arrays
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.
2024-08-23 10:50:24 -04:00
Mark Pollack
793052c2e9 Add googleSearchRetrieval as an option for VertexAIGeminiChatOptions
- Add test
2024-08-22 19:26:36 -04:00
KimMinjeong
bc55bc7196 Add responseMimeType option in VertexAiGeminiChatOptions
- Add test
2024-08-22 18:48:59 -04:00
Mohammed, Ahmed yousri salama (Canada)
189468127c Implement OpenAI Moderation model
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>
2024-08-22 17:39:16 -04:00
Piotr Olaszewski
56e678c487 Add Markdown document reader with enhanced features
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
2024-08-22 13:35:44 -04:00
Soby Chacko
a0ee10fa91 Docs for Tanzu genai cloud bindings 2024-08-22 13:25:30 -04:00
Soby Chacko
72011baf50 Adding ref docs for cloud bindings 2024-08-22 13:09:45 -04:00
Mark Pollack
9ecd9c0940 Add docs for Vector Store observability 2024-08-22 11:07:35 -04:00
Christian Tzolov
9587cb0dfb Add ChatClient input data section to Observability docs 2024-08-22 09:49:32 +02:00
Mark Pollack
99d679f232 Add documentation for Observability 2024-08-21 17:26:03 -04:00
Christian Tzolov
3b014db165 Add ChatClient Advisor Observability support
- Add advisor context, convetions and documentation
- Add ObservableRequestResponseAdvisor wrapper.
- Add Tests

Resolves #1258
2024-08-21 14:28:24 -04:00
Christian Tzolov
e881fefc39 Add spring-ai-test to MongoDB pom 2024-08-20 13:41:21 +02:00
Christian Tzolov
46893b0a99 Add documentation for NVIDIA LLM API integration
Add NVIDIA LLM API - OpenAI Integration Test.
2024-08-19 21:53:20 +02:00
uzhuraul
c2b6e85608 Fix OpenAiAudioSpeechOptions speed description
formatting
2024-08-19 15:26:41 -04:00
Jerry
72369d515f Fix typos in openai-transcriptions.adoc (#1217) 2024-08-15 10:28:52 -04:00
Christian Tzolov
d538e00643 Replace the Embedding format from List<Double> to float[]
- Adjust all affected classes including the Document.
 - Update docs.

Related to #405
2024-08-13 11:53:08 -04:00
jo-kim
656fa8b4fe Update chroma docs (#1171) 2024-08-12 16:39:19 -04:00
JayPark7821
9f5ed055d4 Docs: fix pinecone example (#1170) 2024-08-12 16:38:52 -04:00
ChanYeong
e02c691cec docs: Edit Auto-configuration Example (#1169)
* docs: Edit Auto-configuration Example

* docs: Edit Azure Example

* docs: Edit Oracle Example
2024-08-12 16:37:44 -04:00
Tim Kelly
568d90a92a Update mongodb.adoc (#1181) 2024-08-12 16:31:35 -04:00
dongfeng
aeba9c26ac docs(onnx): Add a note when the onnxruntime_gpu dependency is missing. 2024-08-12 01:27:40 +02:00
Thomas Vitale
bf84d5945e Streamline ChatOptions
* 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>
2024-08-10 14:48:05 +02:00
Christian Tzolov
af25430054 Update OpenAI chat UML diagram 2024-08-09 10:05:39 +02:00
Christian Tzolov
2da161cfb1 Improve OpenAI structured outputs support
- 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
2024-08-09 08:22:58 +02:00
Christian Tzolov
91afed5ae5 OpenAi: Add support for structured outputs and JSON schema
- 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
2024-08-08 17:00:18 -04:00
Dave Syer
e2c5208e3e Correct some grammar typos with 'latter' 2024-08-08 13:08:24 +02:00
JayPark7821
689e458648 Docs: Edit pinecone example (#1154)
```
// Add the documents
vectorStore.add(List.of(document));
```
To
```
// Add the documents
vectorStore.add(documents);
```
2024-08-05 13:35:36 -04:00
Christian Tzolov
4cacbe8468 Refactor Ollama embedding model implementation
- 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
2024-08-04 11:21:45 +02:00
Christian Tzolov
3978e8ecc2 Enhance OpenAI Authentication and Configuration
- 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
2024-08-03 22:30:37 +02:00
Christian Tzolov
3f19c4a6e5 Add OpenAI paralel funciton call option
Resolves #1143
2024-08-01 17:11:11 +02:00
Christian Tzolov
4bb6f6ed44 docs: Updater ollama chat completion diagram 2024-08-01 09:33:46 +02:00
Christian Tzolov
ec3929301e Docs:Add ollama openai API diagram 2024-07-31 19:47:52 +02:00
Soby Chacko
c83630313d Docs cleanup in chat memory section 2024-07-31 13:28:06 -04:00
Christian Tzolov
52ce565472 Add Groq tool calling docs 2024-07-31 16:27:43 +02:00
Christian Tzolov
0aaab0267d Additional Groq documentation improvements 2024-07-31 14:13:01 +02:00
Christian Tzolov
86ab5926ce Improve Groq documentation 2024-07-31 12:54:32 +02:00
Christian Tzolov
aa18a67321 Document how to use Mistral AI over Spring AI OpenAI API.
- Add a related integration test: MistralWithOpenAiChatModelIT

Resolves #1134
2024-07-29 16:08:08 +02:00
Christian Tzolov
0c4d6ab753 Improve Ollama docs 2024-07-27 18:47:51 +02:00
zlzzlzz2l
55347056b0 Docs: Edit typo
- modify streeming to streaming
2024-07-26 17:07:48 +02:00
Christian Tzolov
554fbcd305 minor docs improvment 2024-07-25 11:53:58 +02:00
Christian Tzolov
b9593fe6f0 Remove redundant numGQA option from Ollama options 2024-07-25 09:29:29 +02:00
Christian Tzolov
d53876a624 Add Ollama Function Call support
- 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
2024-07-24 16:28:06 -04:00
Mark Pollack
ee696f33dd Make chat and embedding paths configurable
* Updated docs
* Minor code cleanup
2024-07-24 15:19:01 -04:00
Christian Tzolov
03d1d50130 Update the Azure OpenAI Chat Model to defult to the gpt-4o 2024-07-22 14:51:11 +02:00