Commit Graph

634 Commits

Author SHA1 Message Date
sinsy
5c3ed1152a Add support of Bedrock API timeout
Configure the amount of time to allow the client to complete the execution of an API call.
 This timeout covers the entire client execution except for marshalling. This includes request handler execution,
 all HTTP requests including retries, unmarshalling, etc. This value should always be positive, if present.

  - Add timeout filed to the AbstractBedrockApi, used to initialize the BedrockRuntimeClient and the
    BedrockStreamingRuntimeClient. Update all classes that extend the AbstractBedrockApi.
  - Keep the previous constructors for backward compatibility using timeout value of 5 min.
  - Add a common AWS connection timeout auto-config property and update the documentation.
    Defaults to 5 min.

 Additional changes:
  - Fix Anthropic 3 straming response - add bedrock metrics field.
  - Increate the default timeout to 5 min. Update the docs.
  - Increase the ITs.
2024-04-09 10:28:17 +02:00
Jabez Brew
dd5757cd8c Update ollama-chat.adoc
Fix typo in API class name: OpenAiApi -> OllamaApi

This commit fixes a typo in the API class name mentioned in the documentation. The previous sentence "Low-level OpenAiApi Client" now correctly reads "Low-level OllamaApi Client."
2024-04-08 22:46:18 +02:00
Fu Cheng
0a3a2022a8 Add ObjectMapper in FunctionCallbackWrapper constructor
- This allows custom ObjectMappers to be used when creating FunctionCallbackWrappers.
 - Set the FunctionCallbackWrapper#ObjectMapper default to match the ModelOptionUtils#ObjectMapper config.
2024-04-08 13:30:06 +02:00
Christian Tzolov
70e57a7e27 doc: Update Anthropic 3 class diagram 2024-04-08 08:53:56 +02:00
Christian Tzolov
f88d36de2e Fix anthropic func doc indentation 2024-04-08 08:43:25 +02:00
Christian Tzolov
f249e64651 Add Function Calling Support for Anthropic Features
- expanded the AnthropicApi to include Tool, facilitating request and response abstractions.
 - extended AnthropicChatClient to inherit AbstractFunctionCallSupport, with
   implementation of all necessary methods and function registration protocols.
 - implemented FunctionCallingOptions interface in AnthropicChatOptions.
 - added tools integration tests for AnthropoicApi and AnthropicChatClient.
 - extended the auto-configuration with functional calling functionality.
 - added ITs for tools auto-config.
 - updated documentation on anthropic function calling and relevant pages for comprehensive coverage.
2024-04-07 22:10:35 -04:00
Christian Tzolov
e268975a80 Fix Geminie GenerativeModel handling between calls
Resolves #560
2024-04-07 21:57:14 +02:00
Christian Tzolov
2b421a49ff Move spring-core pom deps versions to the parent pom
Also update the spring could function context to 4.1.1 and jsonchema to 4.35.0
2024-04-07 18:54:32 +02:00
Thomas Vitale
ea849d9075 Ollama: Remove unused option in chat completion
Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
2024-04-07 15:17:56 +02:00
Christian Tzolov
7c09c0963b Fix Chroma package name spelling error
- Rename org.springframework.ai.vectorsore into org.springframework.ai.vectorstore
 - Resolves #540
2024-04-07 13:49:58 +02:00
Christian Tzolov
fc8edaced0 fix failing test 2024-04-07 00:34:05 +02:00
Christian Tzolov
1196ef2f71 Fix OpenAI API Tool Choice configuraiton options
- Related to the  https://platform.openai.com/docs/api-reference/chat/create#chat-create-tool_choice
 - It seems that when a cuntion type is set explicitely: {"type": "function", "function": {"name": "my_function"}}
 the parallel calling is not working anymore!

 Resolves #551
2024-04-07 00:01:38 +02:00
Thomas Vitale
4e473aaff1 Ollama: Added missing fields in API
Fixes gh-553

Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
2024-04-06 17:12:09 +02:00
Thomas Vitale
11d05784b3 OpenAI: Added missing fields to API
Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
2024-04-06 17:04:54 +02:00
Christian Tzolov
4539a41423 docs: update Ollama diagram 2024-04-06 12:49:24 +02:00
Christian Tzolov
1610729d93 Add missing ChatRequest#template parameter 2024-04-06 12:34:05 +02:00
Christian Tzolov
2b8c9923eb Add docs for Ollama's template request parameter 2024-04-06 12:28:10 +02:00
Christian Tzolov
15628a34b2 Fix a compliation error caused with pervious merge 2024-04-06 12:23:48 +02:00
Peter Keeler
aca8ffd400 Support keep-alive and format options in Ollama chat requests
- add support for the advanced parameter 'template'.
 - add docs for the advanced parameters.
2024-04-06 11:44:52 +02:00
PabloSanchi
ae6a019ad1 Add additional properties attribute to watsonx ai option and tests
- fix: remove non-sense underscore checking
- fix: check the model is included in request parameters
- fix: refactor, use constant
- fix: add jsonproperty decorator to additional attribute
- feat: allow additional params merging into the default watsonx option
- fix: remove not needed key
- fix: remove default values in watsonx ai options class
- fix: add default property
2024-04-05 17:02:28 +02:00
Eddú Meléndez
50f549d960 Update testcontainers redis version to 2.2.0 2024-04-04 13:43:01 +02:00
Eddú Meléndez
2b054c9b7e Fix dependencies in spring-ai-spring-boot-testcontainers 2024-04-04 13:43:01 +02:00
Eddú Meléndez
8fa675b145 Update spring boot version to 3.2.4 2024-04-04 13:43:01 +02:00
Christian Tzolov
077a94a4b4 Fix TextSplitterTests 2024-04-04 12:50:44 +02:00
Christian Tzolov
216e165087 fix formatting 2024-04-04 12:38:37 +02:00
Ivan
760a466e22 Remove Vertex AI Gemini model name manual setting from unit tests setup 2024-04-04 12:37:19 +02:00
Ivan
4dbc4c8a8f Add a default model to the initial autoconfiguration chat properties 2024-04-04 12:37:19 +02:00
Hyune-c
fefc6f4173 fix: AzureOpenAiChatOptions to handle null values for presencePenalty and frequencyPenalty 2024-04-04 12:36:36 +02:00
Ricken Bazolo
6753e242e8 Fixing metadata for text splitting 2024-04-04 12:35:39 +02:00
Fu Cheng
2129547923 Fix Usage in Ollama ChatResponse
The Usage of Ollama ChatResponse was put into ChatGenerationMetadata as content filter metadata. The correct place should be in ChatResponseMetadata
2024-04-04 12:17:41 +02:00
messo
9236913696 Fixed typo in ollama-chat.adoc (#522) 2024-04-02 20:13:44 -04:00
Mikhail Laptev
1e4973e4ef broken links in OpenAI docs (#530)
- broken links in OpenAI docs
2024-04-02 20:13:07 -04:00
Sagar Bhat
ed68dfb00c Correct grammar for a message to be thrown as part of an exception when the document was not uploaded successfully (part of the 'add' method). 2024-03-27 09:15:08 +01:00
PabloSanchi
6030db1b9e feat: add default model to doc 2024-03-27 08:13:54 +01:00
PabloSanchi
cdf51acceb feat: add default model 2024-03-27 08:13:54 +01:00
PabloSanchi
ab4ff92c3c fix: remove typo 2024-03-27 08:13:54 +01:00
Christian Tzolov
b8c2df5aac Update getting-started.adoc
fix snapshot version
2024-03-26 10:33:36 +01:00
Christian Tzolov
ce1381ba2b Update getting-started.adoc
Fix the snapshot version to 1.0.0-SNAPSHOT
2024-03-26 10:31:25 +01:00
Christian Tzolov
d42cd60eea Fix: AbstractBedrockApi Streaming reusing of Flux Sink
Resolves: #474
2024-03-25 16:10:37 +01:00
Christian Tzolov
34c4703ea0 Allow Retry on choosen status codes (#495)
- Add a new autoconfig property spring.ai.retry.on-http-codes that list status codes (scuh as 429)
   for which the retry should be attemptd.
 - Updated the docs.

 Resolves #433
2024-03-24 22:57:53 -04:00
Christian Tzolov
c66ed36073 Allow Retry on choosen status codes
- Add a new autoconfig property spring.ai.retry.on-http-codes that list status codes (scuh as 429)
   for which the retry should be attemptd.
 - Updated the docs.

 Resolves #433
2024-03-24 15:05:31 +01:00
Christian Tzolov
7a55d66d77 Add Ollama multimodality support
- Requires LLaVa or Bakllava models.
  - Extend the Ollama chat client to support the Spring AI Medi type inputs.
  - Add OllamaChatClientMultimodalIT.java
  - Add Multimodal section in Ollama's docs.

 Resolves #421
2024-03-24 15:03:07 +01:00
Christian Tzolov
dbf0f9e9e1 Fix embedding_only related test 2024-03-24 15:01:46 +01:00
Christian Tzolov
472ac52bc9 Fix a compliation issue and docs related to 23db7cccdf 2024-03-24 14:55:41 +01:00
Thomas Vitale
23db7cccdf Ollama: remove invalid embedding_only option
Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
2024-03-24 14:43:43 +01:00
David Ko
0a007b4a5c Update openai-chat.adoc - replace withDefaultOptions()
I found the  .withDefaultOptions() is no longer found with new OpenAiChatClient  in the 0.8 snapshot while trying out the sample code.
thank you for the hard work!
2024-03-23 09:11:03 +01:00
Cosmin Ioniță
161a90e48d Fix typo in openai-chat-functions.adoc 2024-03-22 20:00:06 +01:00
youngmon
c757eae8bf Fix TitanChatBedrockApi.java
fix Access modifier

#490
2024-03-22 14:53:50 +01:00
Christian Tzolov
09fb5743d2 Experimental Function Calling tests for AnthropicApi low-level API 2024-03-22 14:34:37 +01:00
Christian Tzolov
50c464fd16 Exlucde, a parasite, lombok dependency 2024-03-22 09:23:35 +01:00