Docs: Add Chat Model comparision page
This commit is contained in:
23
spring-ai-docs/src/main/antora/modules/ROOT/images/no.svg
Normal file
23
spring-ai-docs/src/main/antora/modules/ROOT/images/no.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 8.0 KiB |
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg fill="#000000" width="800px" height="800px" viewBox="0 0 14 14" role="img" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"><path fill="green" d="M13 4.1974q0 .3097-.21677.5265L7.17806 10.329l-1.0529 1.0529q-.21677.2168-.52645.2168-.30968 0-.52645-.2168L4.01935 10.329 1.21677 7.5264Q1 7.3097 1 7t.21677-.5265l1.05291-1.0529q.21677-.2167.52645-.2167.30968 0 .52645.2167l2.27613 2.2839 5.07871-5.0864q.21677-.2168.52645-.2168.30968 0 .52645.2168l1.05291 1.0529Q13 3.8877 13 4.1974z"/></svg>
|
||||
|
After Width: | Height: | Size: 636 B |
@@ -5,6 +5,7 @@
|
||||
** xref:api/advisors.adoc[Advisors]
|
||||
* xref:api/index.adoc[AI Models]
|
||||
** xref:api/chatmodel.adoc[Chat Models]
|
||||
*** xref:api/chat/comparison.adoc[Chat Models Comparison]
|
||||
*** xref:api/bedrock-chat.adoc[Amazon Bedrock]
|
||||
**** xref:api/chat/bedrock/bedrock-anthropic3.adoc[Anthropic3]
|
||||
**** xref:api/chat/bedrock/bedrock-anthropic.adoc[Anthropic2]
|
||||
@@ -91,7 +92,7 @@
|
||||
** xref:api/vectordbs/typesense.adoc[]
|
||||
** xref:api/vectordbs/weaviate.adoc[]
|
||||
|
||||
* xref:observabilty/index.adoc[]
|
||||
* xref:observability/index.adoc[]
|
||||
* xref:api/prompt.adoc[]
|
||||
* xref:api/structured-output-converter.adoc[Structured Output]
|
||||
* xref:api/functions.adoc[Function Calling]
|
||||
|
||||
@@ -58,7 +58,7 @@ TIP: Refer to the xref:getting-started.adoc#dependency-management[Dependency Man
|
||||
|
||||
The prefix `spring.ai.retry` is used as the property prefix that lets you configure the retry mechanism for the Anthropic chat model.
|
||||
|
||||
[cols="3,5,1"]
|
||||
[cols="3,5,1", stripes=even]
|
||||
|====
|
||||
| Property | Description | Default
|
||||
|
||||
@@ -77,7 +77,7 @@ NOTE: currently the retry policies are not applicable for the streaming API.
|
||||
|
||||
The prefix `spring.ai.anthropic` is used as the property prefix that lets you connect to Anthropic.
|
||||
|
||||
[cols="3,5,1"]
|
||||
[cols="3,5,1", stripes=even]
|
||||
|====
|
||||
| Property | Description | Default
|
||||
|
||||
@@ -92,7 +92,7 @@ the output tokens limit is increased from `4096` to `8192` tokens (for claude-3-
|
||||
|
||||
The prefix `spring.ai.anthropic.chat` is the property prefix that lets you configure the chat model implementation for Anthropic.
|
||||
|
||||
[cols="3,5,1"]
|
||||
[cols="3,5,1", stripes=even]
|
||||
|====
|
||||
| Property | Description | Default
|
||||
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
= Chat Models Comparison
|
||||
|
||||
// :YES: image::yes.svg[width=16]
|
||||
// :NO: image::no.svg[width=12]
|
||||
// [%autowidth]
|
||||
|
||||
This table compares various Chat Models supported by Spring AI, detailing their capabilities:
|
||||
|
||||
- Multimodality: The types of input the model can process (e.g., text, image, audio, video).
|
||||
- Tools/Functions: Whether the model supports function calling or tool use.
|
||||
- Streaming: If the model offers streaming responses.
|
||||
- Retry: Support for retry mechanisms.
|
||||
- Observability: Features for monitoring and debugging.
|
||||
- Built-in JSON: Native support for JSON output.
|
||||
- Local deployment: Whether the model can be run locally.
|
||||
- OpenAI API Compatibility: If the model is compatible with OpenAI's API.
|
||||
|
||||
[cols="10,5,1,1,1,1,1,1,1", stripes=even]
|
||||
|====
|
||||
^| Provider ^a| xref:api/multimodality.adoc[Multimodality] ^a| xref:api/functions.adoc[Tools/Functions] ^| Streaming ^| Retry ^| xref:observability/index.adoc[Observability] ^a| xref:api/structured-output-converter.adoc#_built_in_json_mode[Built-in JSON] ^| Local ^| OpenAI API Compatibility
|
||||
|
||||
| xref::api/chat/anthropic-chat.adoc[Anthropic Claude] | text, image ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::no.svg[width=12] ^a| image::no.svg[width=12] ^a| image::no.svg[width=12]
|
||||
|
||||
| xref::api/chat/azure-openai-chat.adoc[Azure OpenAI] | text, image ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::no.svg[width=12] ^a| image::yes.svg[width=16]
|
||||
|
||||
| xref::api/chat/vertexai-gemini-chat.adoc[Google VertexAI Gemini] | text, image, audio, video ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::no.svg[width=12] ^a| image::yes.svg[width=16]
|
||||
|
||||
| xref::api/chat/vertexai-palm2-chat.adoc[Google VertexAI PaML2] | text ^a| image::no.svg[width=12] ^a| image::no.svg[width=12] ^a| image::no.svg[width=12] ^a| image::no.svg[width=12] ^a| image::no.svg[width=12] ^a| image::no.svg[width=12] ^a| image::no.svg[width=12]
|
||||
|
||||
| xref::api/chat/groq-chat.adoc[Groq (OpenAI-proxy)] | text, image ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::no.svg[width=12] ^a| image::no.svg[width=12] ^a| image::yes.svg[width=16]
|
||||
|
||||
| xref::api/chat/huggingface.adoc[HuggingFace] | text ^a| image::no.svg[width=12] ^a| image::no.svg[width=12] ^a| image::no.svg[width=12] ^a| image::no.svg[width=12] ^a| image::no.svg[width=12] ^a| image::no.svg[width=12] ^a| image::no.svg[width=12]
|
||||
|
||||
| xref::api/chat/mistralai-chat.adoc[Mistral AI] | text ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::no.svg[width=12] ^a| image::yes.svg[width=16]
|
||||
|
||||
| xref::api/chat/minimax-chat.adoc[MiniMax] | text ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::no.svg[width=12] ^a| image::no.svg[width=12] ^a|
|
||||
|
||||
| xref::api/chat/minimax-chat.adoc[Moonshot AI] | text ^a| image::no.svg[width=12] ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::no.svg[width=12] ^a| image::no.svg[width=12] ^a|
|
||||
|
||||
| xref::api/chat/nvidia-chat.adoc[NVIDIA (OpenAI-proxy)] | text, image ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::no.svg[width=12] ^a| image::no.svg[width=12] ^a| image::yes.svg[width=16]
|
||||
|
||||
| xref::api/chat/ollama-chat.adoc[Ollama] | text, image ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16]
|
||||
|
||||
| xref::api/chat/openai-chat.adoc[OpenAI] | text, image ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::no.svg[width=12] ^a| image::yes.svg[width=16]
|
||||
|
||||
| xref::api/chat/qianfan-chat.adoc[QianFan] | text ^a| image::no.svg[width=12] ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::no.svg[width=12] ^a| image::no.svg[width=12] ^a| image::no.svg[width=12]
|
||||
|
||||
| xref::api/chat/zhipuai-chat.adoc[ZhiPu AI] | text ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::no.svg[width=12] ^a| image::no.svg[width=12] ^a| image::no.svg[width=12]
|
||||
|
||||
| xref::api/chat/watsonx-ai-chat.adoc[Watsonx.AI] | text ^a| image::no.svg[width=12] ^a| image::yes.svg[width=16] ^a| image::no.svg[width=12] ^a| image::no.svg[width=12] ^a| image::no.svg[width=12] ^a| image::no.svg[width=12] ^a| image::no.svg[width=12]
|
||||
|
||||
| xref::api/chat/bedrock/bedrock-cohere.adoc[Amazon Bedrock/Cohere] | text ^a| image::no.svg[width=12] ^a| image::yes.svg[width=16] ^a| image::no.svg[width=12] ^a| image::no.svg[width=12] ^a| image::no.svg[width=12] ^a| image::no.svg[width=12] ^a| image::no.svg[width=12]
|
||||
|
||||
| xref::api/chat/bedrock/bedrock-jurassic2.adoc[Amazon Bedrock/Jurassic] | text ^a| image::no.svg[width=12] ^a| image::no.svg[width=12] ^a| image::no.svg[width=12] ^a| image::no.svg[width=12] ^a| image::no.svg[width=12] ^a| image::no.svg[width=12] ^a| image::no.svg[width=12]
|
||||
|
||||
| xref::api/chat/bedrock/bedrock-llama.adoc[Amazon Bedrock/Llama] | text ^a| image::no.svg[width=12] ^a| image::yes.svg[width=16] ^a| image::no.svg[width=12] ^a| image::no.svg[width=12] ^a| image::no.svg[width=12] ^a| image::no.svg[width=12] ^a| image::no.svg[width=12]
|
||||
|
||||
| xref::api/chat/bedrock/bedrock-titan.adoc[Amazon Bedrock/Titan] | text ^a| image::no.svg[width=12] ^a| image::yes.svg[width=16] ^a| image::no.svg[width=12] ^a| image::no.svg[width=12] ^a| image::no.svg[width=12] ^a| image::no.svg[width=12] ^a| image::no.svg[width=12]
|
||||
|
||||
| xref::api/chat/bedrock/bedrock-anthropic3.adoc[Amazon Bedrock/Anthropic 3] | text ^a| image::no.svg[width=12] ^a| image::yes.svg[width=16] ^a| image::no.svg[width=12] ^a| image::no.svg[width=12] ^a| image::no.svg[width=12] ^a| image::no.svg[width=12] ^a| image::no.svg[width=12]
|
||||
|
||||
|====
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<= MiniMax Chat
|
||||
= MiniMax Chat
|
||||
|
||||
Spring AI supports the various AI language models from MiniMax. You can interact with MiniMax language models and create a multilingual conversational assistant based on MiniMax models.
|
||||
|
||||
|
||||
@@ -488,7 +488,7 @@ public class CustomerSupportAssistant {
|
||||
The `SimpleLoggerAdvisor` is an advisor that logs the `request` and `response` data of the `ChatClient`.
|
||||
This can be useful for debugging and monitoring your AI interactions.
|
||||
|
||||
TIP: Spring AI supports observability for LLM and vector store interactions. Refer to the xref:observabilty/index.adoc[Observability] guide for more information.
|
||||
TIP: Spring AI supports observability for LLM and vector store interactions. Refer to the xref:observability/index.adoc[Observability] guide for more information.
|
||||
|
||||
To enable logging, add the `SimpleLoggerAdvisor` to the advisor chain when creating your ChatClient.
|
||||
It's recommended to add it toward the end of the chain:
|
||||
|
||||
@@ -11,6 +11,8 @@ This design aligns with Spring's philosophy of modularity and interchangeability
|
||||
Also with the help of companion classes like `Prompt` for input encapsulation and `ChatResponse` for output handling, the Chat Model API unifies the communication with AI Models.
|
||||
It manages the complexity of request preparation and response parsing, offering a direct and simplified API interaction.
|
||||
|
||||
You can find more about available implementations in the xref:api/chatmodel.adoc#_available_implementations[Available Implementations] section as well as detailed comparison in the xref:api/chat/comparison.adoc[Chat Models Comparison] section.
|
||||
|
||||
== API Overview
|
||||
|
||||
This section provides a guide to the Spring AI Chat Model API interface and associated classes.
|
||||
|
||||
@@ -9,7 +9,8 @@ The project was founded with the belief that the next wave of Generative AI appl
|
||||
|
||||
NOTE: Spring AI addresses the fundamental challenge of AI integration: `Connecting your enterprise Data and APIs with the AI Models`.
|
||||
|
||||
image::spring-ai-integration-diagram2.svg[Integration Problem, width=500, align="center"]
|
||||
// image::spring-ai-integration-diagram2.svg[Integration Problem, width=500, align="center"]
|
||||
image::spring-ai-integration-diagram2.svg[Interactive,500,opts=interactive]
|
||||
|
||||
Spring AI provides abstractions that serve as the foundation for developing AI applications.
|
||||
These abstractions have multiple implementations, enabling easy component swapping with minimal code changes.
|
||||
|
||||
Reference in New Issue
Block a user