Commit Graph

377 Commits

Author SHA1 Message Date
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
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
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
TimJ0212
e889fb48ba Update chroma.adoc (#945)
There is a parameter missing. Would avoid confusion
2024-07-02 10:56:55 -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
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
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
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
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
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
GR
997e01ca6b Add support for QianFan AI models
- Add chat, embeddin and image models
- Tests
- Docs
2024-06-22 13:30:38 -04:00
ashni
810a18ee04 Update index.adoc 2024-06-22 15:21:26 +02:00
Christian Tzolov
f9f6247f7e AWS/Bedrock housekeeping updates
- upadate bedrockruntime version to 2.26.7 and align it with aws sdk dependecy.
 - minor ITs configuration, consistency and statbility fixes
   Use the EnvironmentVariableCredentialsProvider instead of the Profile credential provider.
 - update the Bedrock getting started documentation.
 - update the Genemi Prerequisites docs.
2024-06-22 12:22:10 +02:00
Eddú Meléndez
d276d17c1f Add AWS OpenSearch AutoConfiguration
Currently, in order to use an OpenSearch instance provided by AWS,
 additional steps are needed. This commit introduces the required
 configuration.

 Add new starter and update docs
2024-06-21 22:57:06 +02:00
GR
f989dfe06e Update ZhiPuAi model support
- Added additional support for ZhiPuAi models including vision model GLM-4V
- Default model changed to GLM_4_Air and update documentation
- Added additional unit and integration tests
- Add documentation for vision model
2024-06-21 15:52:19 -04:00
GR
172c7f1a1a Add more models and tests for MiniMax AI Model 2024-06-21 15:30:57 -04:00
GR
d5b8123e60 Add support for Moonshot AI model
- Docs
- Tests
2024-06-21 15:23:54 -04:00
Christian Tzolov
dfa3ceb1ab GH-912: Add customizable logger advisor (#913)
* Add customizable logger advisor
* Address review comments
* Use the OutputCaptureExtension to verify the output text

 Resolves #912
2024-06-21 10:26:18 -04:00
Muthukumaran Navaneethakrishnan
f0ca61252b Add support for customizable PgVectorStore schema, table, and index names (#747)
This change allows users to specify custom names, facilitating management of multiple vector databases within a single database instance.

 Key changes:
 - Implement configurable schema, table, and index names for PgVectorStore
 - Add properties to set custom schema and table names
 - Introduce optional schema/table & field validation for custom configurations
 - Include additional tests for new configurations and existing deployments

 Additional improvements:
 - Rename properties to schemaName, tableName, and schemaValidation
 - Update pgvector documentation with new properties
 - Add schema/table name tests to PgVectorStoreAutoConfigurationIT and PgVectorStorePropertiesTests
 - Create standalone PgVectorSchemaValidator class for schema/table validation
 - Add missing 'CREATE SCHEMA IF NOT EXISTS' when initializeSchema=true
 - Remove redundant code and classes

 Resolves #747

Co-authored-by: Christian Tzolov <ctzolov@vmware.com>
2024-06-21 11:02:22 +02:00
geetrawat
067a33dbe2 Improved GemFire support
- Adds spring boot auto-configuration support for GemFireVectorStore
- Adds integration test GemFireVectorStoreAutoConfigurationIT
- Includes gemfire-testcontainers in integration tests
- Adds unit test GemFireVectorStorePropertiesTests
- Refactors GemFireVectorStore.java extracting GemFireVectorStoreConfig.java
- Renames spring-ai-gemfire to spring-ai-gemfire-store
- Adds GemFireConnectionDetails
- Adds GemFireVectorStoreProperties with default values
- Remove gemfire-release-repo maven repository

Co-authored-by: Louis Jacome <louis.jacome@broadcom.com>
Co-authored-by: Jason Huyn <jason.huynh@broadcom.com>
2024-06-20 17:17:13 -04:00
Mark Pollack
6bd3bca1d7 update contribution docs 2024-06-20 10:38:30 -04:00
Bill Lau
7d83ed63d1 Update openai-embeddings.adoc
fix base-url error in openai-embeddings.adoc
2024-06-20 09:20:59 +02:00
Eddú Meléndez
37c222a5f3 Add OpenSearch Service Connection support
Service Connection support for Docker Compose and Testcontainers.
2024-06-20 07:20:30 +02:00