Commit Graph

411 Commits

Author SHA1 Message Date
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
Piotr Olaszewski
0e97f9c579 Introduce AzureOpenAI transcription support
- Breaking changes: Classes from the org.springframework.ai.openai.metadata.audio.transcription package have been moved to the org.springframework.ai.audio.transcription package.
 - The AzureOpenAiAudioTranscriptionModel has been added to the auto-configuration.
 - The spring.ai.azure.openai.audio.transcription prefix was introduced for properties.
 - Introduces options properties which cover all of them (see: AzureOpenAiAudioTranscriptionOptions).
 - fix missing MutableResponseMetadata
 - add docs
 - adjust code to updated ResponseMetadata design
 - add test to AzureOpenAiAutoConfiguration
 - add missing AzureOpenAiAudioTranscriptionModel tests
2024-07-22 14:08:11 +02:00
Christian Tzolov
92ec519142 Update Message API diagram 2024-07-21 12:02:53 +02:00
Christian Tzolov
be7544c423 Improve Message docs 2024-07-21 11:56:53 +02:00
Christian Tzolov
7dc5f19acb Documentation improvements 2024-07-20 16:18:11 +02:00
Christian Tzolov
9b81df69a6 Update message docs 2024-07-20 11:58:18 +02:00
Christian Tzolov
53821489d1 improve message/prompt docs 2024-07-19 23:33:44 +02:00
Christian Tzolov
5dc9480eea Anthropic: make the beta features header value configurable
- add new spring.ai.anthropic.beta-version property.
  - add ITs.

  Resolves #1068
2024-07-18 20:54:28 +02:00
Soby Chacko
50d34b8a48 BREAKING CHANGE - Change vector store initialize-schema to false
* Change default schema initialization of vector stores from `true` to `false.`
  Users need to explicitly opt-in for schema initialization by setting the
  `initialize-schema` property on the corresponding vector store.
* Update integration tests
* Update docs

Fixes #907
2024-07-18 14:28:00 -04:00
Eddú Meléndez
0a07f65d6a Use RedisAutoConfiguration in RedisVectorStoreAutoConfiguration
Currently, `RedisVectorStoreAutoConfiguration` creates its own
configuration to connect with Redis. This commit reuse
`RedisAutoConfiguration` from spring boot project. It's limited
to Jedis.
2024-07-18 14:24:10 +02:00
Christian Tzolov
ab474789d4 Minor docs improvements 2024-07-17 13:38:02 +02:00
mck
4aacab020b Implement CassandraChatMemory
- 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
2024-07-17 11:42:09 +02:00
양예성
cf785e03c2 Added information about models that are no longer supported
We have added information for reference as there are examples of models that are scheduled to end support.
2024-07-17 11:18:22 +02:00
Christian Tzolov
b36ee13e02 Docs: OpenAI Replace GPT_4_VISION_PREVIEW by GPT_4_O 2024-07-17 11:16:31 +02:00
John Blum
f783796934 Correct grammar in RAG and Function Calling sections
Resolves #1060
2024-07-17 11:01:08 +02:00
Christian Tzolov
39164ad111 Disable function calling docs ZhiPu AI until proven it works 2024-07-16 20:11:28 +02:00
Christian Tzolov
697a04b6d0 Moonshot: No Function Calling support verificaiton
Update the docs and tests to verify that currently Moonshot ChatModel does not
 support Function Calling.

 Related to #1058
2024-07-16 17:55:28 +02:00
Johnny Lim
7c26c7bcdf Polish 2024-07-16 10:05:28 +02:00
Christian Tzolov
df7ac05235 Correct repetitive entries in the documentation catalog 2024-07-16 09:40:57 +02:00
Chris Turchin
f07e3911dc Fix system messages handling issue
- 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>
2024-07-15 19:26:12 +02:00
吴博
28c0d24807 Updates to ZhiPuAi model
* Adjust chat api request options and add unit test

Fix options of zhipu ai chat model
2024-07-10 15:53:40 -04:00
Christian Tzolov
c70c20b79d Add VertexAI Embedding Model support
- 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
2024-07-10 15:36:13 -04:00
David
40df264078 Fix example code in upgrade-notes.adoc 2024-07-09 14:53:51 +02:00