Commit Graph

1453 Commits

Author SHA1 Message Date
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
Christian Tzolov
61a56db98b Update Azure OpenAI to 1.0.0-beta.10 2024-07-09 13:08:42 +02:00
Christian Tzolov
dd22342c0c Improve ONNX Tansformer Embedding Model
- Fix model output name handling.
 - Improve documentation.
2024-07-09 11:21:53 +02:00
Christian Tzolov
f61ccdd09d Add Groq inference support via OpenAI client
- add dedicated groq chat page in the documentation.
   Explain how to re-configure the OpenAI client for accessing the Groq chat completion endpoint.
 - Doc: order the Chat and Embedding items in alphabetical order
 - Add Groq ITs.

 Resolves #996
2024-07-05 16:42:46 -04:00
Francisco Javier Torres
867bd173e5 Set embeddings on added Document objects for Milvus and PgVector stores. 2024-07-05 16:37:38 -04:00
jiwoo
6931148377 Fix MilvusVectorStore max allowed dimension size to 32768 2024-07-05 16:32:59 -04:00
Mark Pollack
a1afb0db46 Fix Mongo VectorStore persistance issue
Fixes #698
2024-07-05 16:26:02 -04:00
Ross Lawley
24da2efc86 Fix IndexAlreadyExists exception for spring-ai-mongodb-atlas-store
In testing the docker mongodb/atlas container doesn't throw an exception when
calling `mongoTemplate.executeCommand({"createSearchIndexes": ...});`. However,
when using the Atlas service it does and throws a `IndexAlreadyExists` exception.

Added error handling for error code 68 or error code name `IndexAlreadyExists`.
See: https://www.mongodb.com/docs/manual/reference/error-codes/

Fixes #910
2024-07-05 14:38:38 -04:00
Mark Pollack
455d39e7cd Improve error messages in OpenAI Autoconfiguration 2024-07-05 12:18:39 -04:00
Christian Tzolov
f171b0fa5e Handle OpenAiChatModel NPE for partially compatible OpneAI API such as the NVIDIA API 2024-07-03 16:14:42 +02:00
devholic22
4ff2f1fc06 Add comment in MessageType for readability
- Add comment in MessageType for readability
2024-07-03 15:04:42 +02:00
Christian Tzolov
a749b1bde6 Docs: update Anthropic list of supported models 2024-07-03 11:07:42 +02:00
Christian Tzolov
feb0020d2f Docs: update Anthropic list of supported models 2024-07-03 11:01:38 +02:00
Christian Tzolov
d8be884cb1 Improve Anthropic Claude streaming handling
- add StreamEven API domain model for reliably parsing stream events.
 - add StreamHelper#mergeToolUseEvents to aggregate partial tool use jsons into a list of ContentBlocks.
 - add StreamHelper#eventToChatCompletionResponse to convert Flux<StreamEvents> into Flux<ChatCompletionResponse>.
 - Rename MediaContent -> ContentBlock, RequestMessage -> AnthropicMessage, ChatCompletion -> ChatCompletionResponse.
 - Improve tests and docs.
2024-07-02 23:36:25 +02:00
Mark Pollack
cb6662a61e Various code cleanup
Co-authored-by: Alex Klymenko <alxkm@users.noreply.github.com>
2024-07-02 15:35:01 -04:00
Mark Pollack
da4b26f74c Update TikaDocumentReaderTests to use easier to parse web site as input 2024-07-02 12:37:25 -04:00
devholic22
3411e3e74d Add comments in OpenAiAudioSpeechModel
* Add comments in OpenAiAudioSpeechModel like OpenAiChatModel

* Remove duplicated word in OpenAiAudioSpeechOptions AudioResponseFormat comment
2024-07-02 11:43:52 -04:00
jiwoo
3bec210b80 Add additional tests for Document metadata and TextSplitter 2024-07-02 11:37:10 -04:00
Nicholas Zhan
5417d19d9a Fix prompt template validation if a variable name contains hyphen 2024-07-02 11:13:54 -04:00
TimJ0212
e889fb48ba Update chroma.adoc (#945)
There is a parameter missing. Would avoid confusion
2024-07-02 10:56:55 -04:00
xiehui1956
f5608be65d Add Minimax AutoConfiguration.imports file 2024-07-02 10:42:07 -04:00
Christian Tzolov
13a4e76511 Azure AI: Support OpenAI key and MS Entra auth
- Enable Authentication using OpenAI API key
- Use TokenCredential for authorization if provided by the user
- Add the spring.ai.azure.openai.openai-api-key for auth with OpenAI service
- Update Azure Chat and Embedding docs
- Add integration tests for OpenAI connection

Resolves #260
2024-07-02 10:33:09 -04:00
Lorenzo Caenazzo
237feb3437 ⬆️ bump tika to 3.0.0-BETA to avoid pdfbox version conflicts 2024-07-02 16:17:59 +02:00
Mariusz Bernacki
f5b72242c0 Add Anthropic Claude streaming Function Calling support
Resolves #930
2024-07-02 10:28:31 +02:00
ASHWIN KRISHNA K
a22e62d1fa Changes related to typo mistake in chat client documentation (#980)
Resolves https://github.com/spring-projects/spring-ai/issues/966
2024-07-01 14:53:19 -04:00
DadySu
9e5eff18fb Ref docs cleanup - Function Calling chapter (#985)
Add line break in Function Calling chapter
2024-07-01 14:49:26 -04:00
Craig Walls
b5cc9db88a Accept response as a String instead of ChatResponse in EvaluationRequest
- Update docs
2024-07-01 12:05:01 -04:00
Craig Walls
9956367fc8 Accept String answer in BasicEvaluationTest instead of ChatResponse 2024-07-01 11:52:46 -04:00
Lorenzo Caenazzo
0f07b7bb8a :fix: constructor error messages 2024-06-28 12:30:10 +02:00
devholic22
9f56a91657 Fix OpenAiChatModel NPE
* Fix OpenAiChatModel NPE using getOrDefault
2024-06-28 11:54:31 +02:00
Christian Tzolov
c09286eedf Fix javadoc formatting 2024-06-28 11:31:57 +02:00
dongfeng3692
df52c9fbb5 Minor javadoc improvements 2024-06-28 11:20:07 +02:00
ashni
fe3097ebf0 Update mongodb.adoc
* Adding links + descriptions for MongoDB Atlas and MongoDB Atlas Search.
* One sentence per line.
2024-06-27 18:19:11 -04:00
Yulong Shi
f92068f160 Update Redis vector store docs (#963)
* The dependency should be `spring-ai-redis-store-spring-boot-starter` instead of `spring-ai-transformers-spring-boot-starter` for Redis vector store.
2024-06-27 16:43:11 -04:00
Hyoseop Song
5b4d4c19d1 Fix typo in documentation (#965)
* Fixed typographical errors in key documents
2024-06-27 16:37:31 -04:00
Mark Pollack
a1c4a29073 AzureVectorStore Fix - when not initializing schema, create searchClient from index name 2024-06-26 19:22:53 -04:00
Soby Chacko
b206b37dfd Consistent vector store property prefix for Chroma store
* The Chroma vector store config property prefix uses .store at the end
  which is not consistent with the other vector stores - fixing this.

* Update the upgrade-notes.adoc
2024-06-26 11:17:10 -04:00
Jonatan Soto
0f93828025 Update openai-chat.adoc (#957)
Fixed typo
2024-06-26 10:53:50 -04:00
rapenumaka
5cdbc87fb1 Update openai-chat.adoc (#951)
* Added a missing semicolon in the sample code in the documentation
2024-06-25 14:36:37 -04:00
Eddú Meléndez
feecca77c3 Use Weaviate's readiness endpoint
Currently, Testcontainers Weaviate implementation relies on port availability.
This commit switch to Weaviate's readiness endpoint.
2024-06-24 17:48:04 +02:00
Thomas Vitale
3227311314 Introduce id and model in ChatResponseMetadata
* Extend ChatResponseMetadata for Anthropic (blocking, streaming)
* Add ChatResponseMetadata for Mistral AI (blocking)
* Extend ChatResponseMetadata for OpenAI (blocking)
* Deprecate gpt-4-vision-preview and replace its usage in tests because OpenAI rejects the calls (see: https://platform.openai.com/docs/deprecations)

Fixes gh-936

Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
2024-06-24 14:10:19 +02:00
Christian Tzolov
25a03728e6 Update anthropic API class diagram 2024-06-24 12:13:36 +02:00
Christian Tzolov
43df62303a Update the OpenAiApi class diagram
Related to #920
2024-06-24 11:48:28 +02:00
Eddú Meléndez
c053289f4a Support Chroma's CHROMA_SERVER_AUTH_CREDENTIALS env var from version 0.4.x
Currently, Docker Compose and Testcontainers support `CHROMA_SERVER_AUTHN_CREDENTIALS`,
which is provided by Chroma 0.5.x. Previous versions use `CHROMA_SERVER_AUTH_CREDENTIALS`
instead.
2024-06-24 11:42:38 +02:00
El Mahdi OUKHAMOU
865f62a04a Update concepts.adoc
I corrected a typo.
2024-06-24 08:51:34 +02:00
Mariusz Bernacki
20e4b5609a OpenAI: Add support for streamin token usage.
- OpenAiApi: add StreamingOptions class and ChatCompletionRequest#streamingOptions field.
 - add OpenAiChatOption#withStreamingUsage(boolean) to set/unset the StreamingOptions.
 - add a boolean (get/set)StreamUsage() to OpenAiChatOptions that internally set the SstreamOptions.
   Later allows the "spring.ai.openai.chat.options.stream-usage" property.
 - update the OpenAI property documentation.

Co-authored-by: Christian Tzolov <ctzolov@vmware.com>
2024-06-24 08:42:38 +02:00
Eddú Meléndez
12dbc1effb Align OpenSearch image version 2024-06-22 20:52:10 +02:00
Eddú Meléndez
fd19b4430a Update actions/checkout and actions/setup-java version to v4 2024-06-22 20:51:42 +02:00
Mariusz Bernacki
b822107586 Fix Anthropic token usage handling in streaming 2024-06-22 20:15:34 +02:00