Commit Graph

1265 Commits

Author SHA1 Message Date
Sujin Kim
2d7b00a3fb docs : correct typo "1st" and "supporetd" in anthropic-chat-function 2024-10-22 12:42:46 +02:00
Sujin Kim
91ee20d9cf docs : correct typo from "what it" to "what is" in bedrock-cohere.adoc 2024-10-22 12:42:46 +02:00
Ricken Bazolo
87d055aff2 fix azure openai doc 2024-10-22 12:42:11 +02:00
Ricken Bazolo
27000c4098 fix azure openai doc 2024-10-22 12:42:11 +02:00
Ricken Bazolo
e433d599a1 Fixed broken link to test class in mistralai doc 2024-10-22 12:42:11 +02:00
Benoit Moussaud
57754e8e5d Update azure.adoc fixing type 2024-10-22 12:40:08 +02:00
dafriz
e83bddfb37 docs: fix link to moonshot-chat.adoc 2024-10-22 12:33:19 +02:00
Thomas Vitale
ef2e39a8ad Normalize Ollama model names in auto-pull feature
In order to support edge cases due to different naming formats, this PR introduced an explicit normalization logic to ensure the correct matching when checking for the availability of a certain model. Integration tests have been added to cover the different scenarios, including models from Ollama and from Hugging Face.

Also fix the container creation on the useTestcontainers flag (christian)

Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
2024-10-22 12:10:58 +02:00
Thomas Vitale
d5bc9c998c Consolidate Ollama auto-pull logic
Consolidate the Ollama auto-pull logic at startup time, supporting the auto-pull for the default models specified via configuration properties and for optional models specified for initialization.

Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
2024-10-21 23:19:11 +02:00
Christian Tzolov
1cadc49a9b Docs: start tabulating the Maven/Gradle code snippets 2024-10-21 15:02:19 +02:00
Christian Tzolov
278a61fde4 Fix doc ref links 2024-10-21 10:24:28 +02:00
devholic22
854a7d99a3 fix: remove 1.0-SNAPSHOT in all OpenAI links
- remove 1.0-SNAPSHOT in all OpenAI links
2024-10-21 10:15:59 +02:00
devholic22
fd8746a99d fix: remove snapshot link in OpenAI TTS link
- remove snapshop link in OpenAI TTS link
2024-10-21 10:15:59 +02:00
Christian Tzolov
6006bd7abe Docs: start adding tabs for Maven/Gradle sections 2024-10-21 08:58:58 +02:00
Christian Tzolov
9c390ff9fb Reomve redundant files 2024-10-20 14:00:03 +02:00
Christian Tzolov
1252216f3a Revert antora-component-version-maven-plugin 2024-10-20 13:39:05 +02:00
Christian Tzolov
261f18cc01 Update Spring AI docs build and content
- Upgrade Antora Maven plugin to 1.0.0-alpha.4 (replace
  Replace the io.spring.maven.antora:antora-maven-plugin:0.0.4)
- Update playbook configuration for Antora 3.2.0-alpha.6
- Refine documentation layout and styling
- Enhance observability documentation with formatted tables
- Adjust Spring AI logo size and update integration diagram
2024-10-20 12:30:55 +02:00
Thomas Vitale
5e8cecd8b1 Enhance Ollama model auto-pull feature
* Fix configuration inheritance issue when default value is not specified.
* Make it possible to enable the auto-pull feature only for specific model types (e.g. for chat models only).
* Add the possibility to list explicit models to auto-pull at startup time.

Update Ollama model defaults and add new embedding model

* Change default chat model to Mistral
* Change default embedding model to mxbai-embed-large
* Add MXBAI_EMBED_LARGE to OllamaModel enum
* Remove DEFAULT_MODEL constant from OllamaOptions
* Update relevant classes to use new defaults

Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
Co-authored-by:Christian Tzolov <ctzolov@vmware.com>
2024-10-20 08:20:16 +02:00
Josh Long
d17c0720fd reproducible. 2024-10-19 13:29:46 +03:00
Christian Tzolov
a09972a29a Dock: improve chat-model documentation 2024-10-19 09:25:23 +02:00
Thomas Vitale
8eef6e6da5 Ollama: Pull models automatically at startup
* Introduce support for Ollama model auto-pull at startup time
* Enhance support for Ollama model auto-pull at run time
* Update documentation about integrating with Ollama and managing models
* Adopt Builder pattern in Ollama Model classes for better code readability
* Unify Ollama model auto-pull functionality in production and test code
* Improve integration tests for Ollama with Testcontainers
2024-10-18 15:42:28 +02:00
Christian Tzolov
5dfdd8ddcd Doc: improve table formating 2024-10-17 21:45:07 +02:00
Christian Tzolov
d1bac75952 Docs: Add Chat Model comparision page 2024-10-17 21:15:12 +02:00
Christian Tzolov
e970c26269 Update antora version and extensions 2024-10-17 13:59:07 +02:00
Christian Tzolov
322d0fb336 Refactor Ollama implementation and improve documentation
- Enhance OllamaModelPuller with configurable retry timeout
 - Update test cases to use LLAMA3_1 instead of LLAMA3_2
 - Improve Ollama documentation with clearer prerequisites and model pulling instructions
 - Update Spring AI introduction page with new logo and diagram
 - Remove unnecessary main method from OllamaModelPuller
2024-10-17 12:54:47 +02:00
Christian Tzolov
272e541c18 Docs: chat model diagram updates 2024-10-17 10:45:05 +02:00
Christian Tzolov
2a9f9c811d Ollama: add model auto-pull feature
- Introduce internal OllamaModelPuller helper for managing model availability
 - Add pullMissingModel option to OllamaOptions
 - Implement auto-pull functionality in OllamaChatModel and OllamaEmbeddingModel
 - Update tests to cover new auto-pull feature
 - Add reference documentation

 Resolves #526
2024-10-17 00:14:59 +02:00
shushengcoder
f461bd603d Add support for multiple types in Chroma metadata
- Change Chroma collection metadata to Map<String, Object>
- Allows integer and other value types to be passed in

Fixes #1548
2024-10-16 16:25:17 -04:00
Mark Pollack
d0c53392aa Update spring-javaformat to version 0.0.43
- Ran ./mvnw spring-javaformat:apply that made some new formatting changes
2024-10-16 15:50:04 -04:00
Christian Tzolov
2e0a51fac5 Streamline dependencies and improve API consistency
- Remove unnecessary spring-web dependencies
 - Update third-party library versions
 - Refactor API classes to use consistent header handling
 - Remove ApiUtils class and inline its functionality
 - Adjust RestClient and WebClient builder usage in autoconfiguration
 - Replace direct RestClient.Builder injections with ObjectProvider<RestClient.Builder>
   and WebClient.Builder injections with ObjectProvider<WebClient.Builder>
 - Update ChromaVectorStoreAutoConfiguration to use ObjectProvider
 - Rename MongoDbAtlasLocalContainerConnectionDetailsFactoryTest to IT
 - Switch spring-ai-chroma-store dependency from spring-web to spring-webflux
 - Simplify ChromaApi constructor by using method reference for default headers
 - Adjust import order

 Resolves #1066
 Resolves #524
2024-10-16 15:46:03 -04:00
Christian Tzolov
a69f6bb57b update doc diagram 2024-10-16 17:50:07 +02:00
Christian Tzolov
2e045e2607 Minor doc diagram improvements 2024-10-16 16:12:43 +02:00
Thomas Vitale
f0f3501f8e Ollama integration tests fix
* Disable tests by default
* Improve Testcontainers configuration
2024-10-15 09:06:44 +02:00
Christian Tzolov
f004ee7d35 Update index.adoc
minor abbreviation correction
2024-10-15 08:43:59 +02:00
Thomas Vitale
cc518b2cbc Support Ollama APIs for model management
* Extend the OllamaApi to support listing, copying, deleting, and pulling models programmatically.
* Improve setup for integration testing with Ollama and Testcontainers.

Enables gh-526

Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
2024-10-14 22:03:59 -04:00
Christian Tzolov
3d252ca173 Copy metadata in ChatResponse Builder's from() method
- Update ChatResponse.Builder to copy all metadata fields when using from()
 - Expand test case to verify correct metadata copying in QA advisor

 Resolves #1537
2024-10-14 22:58:10 +02:00
CodingLuizy
a39aadc327 Fix typo in ChatClient docs
- correct response key from "generation" to "completion" in example code

The example response in the documentation incorrectly uses "generation" as the response key. This commit updates it to "completion" to accurately reflect the API's actual response format.
2024-10-14 15:46:58 -04:00
Christian Tzolov
8750ba0806 Enhance top-level tool/function calling doc
- Add detailed explanation of function calling mechanism
 - Examples use only the portable, ChatClient API
 - Include quick start guide with code examples
 - Describe multiple ways to register custom functions as beans
 - Explain how to enable functions by bean name
 - Add section on registering functions dynamically
 - Introduce new Tool Context feature for passing additional data
 - Improve overall structure and readability of the document
2024-10-14 15:43:21 -04:00
Christian Tzolov
d523ffb854 Restructure documentation navigation
- Only the catalog is updated. No existing links are changed
 - Move 'AI Concepts' under 'Overview'
 - Reorganize API sections for better hierarchy
 - Move 'Vector Databases' into its own top-level section
 - Reposition 'Function Calling', 'Multimodality', 'Testing', and 'Structured Output' as top-level items
 - Remove redundant nesting in some sections
 - Comment out 'Generic Model' section
 - Rename AI Model API into AI Models
 - Get rid of the API suffix
 - Improve Multimodality doc
 - Update feature listing
2024-10-14 15:38:18 -04:00
Lukas ʕ•́ᴥ•̀ʔ
cf99e77a2c Fix spelling mistake in Azure OpenAI Chat docs 2024-10-14 15:03:39 -04:00
Craig Walls
83923f25d8 Doc fix, reword Tip text to be more appropriate to Gemini 2024-10-14 15:01:53 -04:00
dafriz
c9f50da12a Add metadata to BedrockAnthropic3ChatModel response
This commit enhances the Bedrock Anthropic model's output:

- Add response ID, model name, and usage data to ChatResponseMetadata
- Introduce DefaultUsage class for token usage information
- Update BedrockAnthropic3ChatModel to include new metadata
- Add Jackson annotations for serialization/deserialization
- Implement unit tests for DefaultUsage

These changes provide structured, serializable metadata in the
ChatResponse, improving the model's output with additional
information.
2024-10-14 14:58:37 -04:00
Christian Tzolov
6d38c85ff6 Refactor Ollama usage metadata to add embedding support
- Extend the OllamaApi.EmbeddingsResponse with total_duration,
   load_duration and prompt_eval_count fields
 - Rename OllamaUsage to OllamaChatUsage for clarity
 - Add OllamaEmbeddingUsage to track embedding-specific usage metrics
 - Update OllamaEmbeddingModel to use OllamaEmbeddingUsage
 - Extend EmbeddingsResponse with additional metadata fields
 - Update tests to reflect new usage tracking for embeddings

 Resolves #1536
2024-10-14 11:52:23 +02:00
Christian Tzolov
fe09b4ddce Bring antora packages up to date 2024-10-12 16:51:10 +02:00
Christian Tzolov
4c61e47621 Upgrade antora to v0.4.16 2024-10-12 14:31:17 +02:00
Christian Tzolov
0c5455e4cd Improve context formatting in QuestionAnswerAdvisor
- Add line breaks and clarify context boundaries in user text advice.
   This improve the performance of a Llama3.x
 - Update corresponding test to reflect new formatting
2024-10-10 14:39:54 +02:00
Mark Pollack
4c83fe8302 Guard against NPE in ZhiPu embedding model
- Update retry test to pass - needs investigation
2024-10-08 23:37:00 +02:00
Mark Pollack
4a892b5269 Release version 1.0.0-M3 2024-10-08 23:18:50 +02:00
GR
cc3d338fa3 optimize: remove useless TODO comment on ZhiPu chat model 2024-10-08 20:53:32 +02:00
GR
77586d5f86 Add observability to QianFan image model 2024-10-08 20:51:11 +02:00