Improve Antora documentation layout
- tename /api/clients/ into /api/chat - move the the image from /api/clients to /api - fix the layout inside the chat and embeddings docs. Moving the runtime options and sample controllers at top level. - adjust all affected links.
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
[Azure OpenAI Chat Documentation](https://docs.spring.io/spring-ai/reference/api/clients/azure-openai-chat.html)
|
||||
[Azure OpenAI Chat Documentation](https://docs.spring.io/spring-ai/reference/api/chat/azure-openai-chat.html)
|
||||
|
||||
[Azure OpenAI Embedding Documentation](https://docs.spring.io/spring-ai/reference/api/embeddings/azure-openai-embeddings.html)
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
[Amazon Bedrock Overview](https://docs.spring.io/spring-ai/reference/api/bedrock.html)
|
||||
|
||||
- [Anthropic Chat Documentation](https://docs.spring.io/spring-ai/reference/api/clients/bedrock/bedrock-anthropic.html)
|
||||
- [Cohere Chat Documentation](https://docs.spring.io/spring-ai/reference/api/clients/bedrock/bedrock-cohere.html)
|
||||
- [Anthropic Chat Documentation](https://docs.spring.io/spring-ai/reference/api/chat/bedrock/bedrock-anthropic.html)
|
||||
- [Cohere Chat Documentation](https://docs.spring.io/spring-ai/reference/api/chat/bedrock/bedrock-cohere.html)
|
||||
- [Cohere Embedding Documentation](https://docs.spring.io/spring-ai/reference/api/embeddings/bedrock-cohere-embedding.html)
|
||||
- [Llama2 Chat Documentation](https://docs.spring.io/spring-ai/reference/api/clients/bedrock/bedrock-llama2.html)
|
||||
- [Titan Chat Documentation](https://docs.spring.io/spring-ai/reference/api/clients/bedrock/bedrock-titan.html)
|
||||
- [Llama2 Chat Documentation](https://docs.spring.io/spring-ai/reference/api/chat/bedrock/bedrock-llama2.html)
|
||||
- [Titan Chat Documentation](https://docs.spring.io/spring-ai/reference/api/chat/bedrock/bedrock-titan.html)
|
||||
- [Titan Embedding Documentation](https://docs.spring.io/spring-ai/reference/api/embeddings/bedrock-titan-embedding.html)
|
||||
|
||||
NOTE: There is not yet an implementation for Jurassic, but you can use the lower level client [Ai21Jurassic2ChatBedrockApi.java](https://github.com/spring-projects/spring-ai/blob/main/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/jurassic2/api/Ai21Jurassic2ChatBedrockApi.java) in the meantime. See [Issue 343](https://github.com/spring-projects/spring-ai/issues/343)
|
||||
@@ -1,2 +1,2 @@
|
||||
[Huggingface Chat Documentation](https://docs.spring.io/spring-ai/reference/api/clients/huggingface.html)
|
||||
[Huggingface Chat Documentation](https://docs.spring.io/spring-ai/reference/api/chat/huggingface.html)
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
[Ollama Chat Documentation](https://docs.spring.io/spring-ai/reference/api/clients/ollama-chat.html)
|
||||
[Ollama Chat Documentation](https://docs.spring.io/spring-ai/reference/api/chat/ollama-chat.html)
|
||||
|
||||
[Ollama Embedding Documentation](https://docs.spring.io/spring-ai/reference/api/embeddings/ollama-embeddings.html)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[OpenAI Chat Documentation](https://docs.spring.io/spring-ai/reference/api/clients/openai-chat.html)
|
||||
[OpenAI Chat Documentation](https://docs.spring.io/spring-ai/reference/api/chat/openai-chat.html)
|
||||
|
||||
[OpenAI Embedding Documentation](https://docs.spring.io/spring-ai/reference/api/embeddings/openai-embeddings.html)
|
||||
|
||||
[OpenAI Image Generation](https://docs.spring.io/spring-ai/reference/api/clients/image/openai-image.html)
|
||||
[OpenAI Image Generation](https://docs.spring.io/spring-ai/reference/api/image/openai-image.html)
|
||||
|
||||
[OpenAI Transcription Generation](TODO)
|
||||
@@ -1,4 +1,4 @@
|
||||
[VertexAI PaLM2 Chat Documentation](https://docs.spring.io/spring-ai/reference/api/clients/vertexai-chat.html)
|
||||
[VertexAI PaLM2 Chat Documentation](https://docs.spring.io/spring-ai/reference/api/chat/vertexai-chat.html)
|
||||
|
||||
[VertexAI PaLM2 Embedding Documentation](https://docs.spring.io/spring-ai/reference/api/embeddings/vertexai-embeddings.html)
|
||||
|
||||
|
||||
@@ -3,23 +3,23 @@
|
||||
* xref:getting-started.adoc[Getting Started]
|
||||
* xref:api/index.adoc[]
|
||||
** xref:api/chatclient.adoc[]
|
||||
*** xref:api/clients/openai-chat.adoc[OpenAI]
|
||||
**** xref:api/clients/functions/openai-chat-functions.adoc[Function Calling]
|
||||
*** xref:api/clients/ollama-chat.adoc[Ollama]
|
||||
*** xref:api/clients/azure-openai-chat.adoc[Azure OpenAI]
|
||||
**** xref:api/clients/functions/azure-open-ai-chat-functions.adoc[Function Calling]
|
||||
*** xref:api/chat/openai-chat.adoc[OpenAI]
|
||||
**** xref:api/chat/functions/openai-chat-functions.adoc[Function Calling]
|
||||
*** xref:api/chat/ollama-chat.adoc[Ollama]
|
||||
*** xref:api/chat/azure-openai-chat.adoc[Azure OpenAI]
|
||||
**** xref:api/chat/functions/azure-open-ai-chat-functions.adoc[Function Calling]
|
||||
*** xref:api/bedrock-chat.adoc[Amazon Bedrock]
|
||||
**** xref:api/clients/bedrock/bedrock-anthropic.adoc[Anthropic]
|
||||
**** xref:api/clients/bedrock/bedrock-llama2.adoc[Llama2]
|
||||
**** xref:api/clients/bedrock/bedrock-cohere.adoc[Cohere]
|
||||
**** xref:api/clients/bedrock/bedrock-titan.adoc[Titan]
|
||||
*** xref:api/clients/huggingface.adoc[HuggingFace]
|
||||
*** xref:api/clients/google-vertexai.adoc[Google VertexAI]
|
||||
**** xref:api/clients/vertexai-palm2-chat.adoc[VertexAI PaLM2 ]
|
||||
**** xref:api/clients/vertexai-gemini-chat.adoc[VertexAI Gemini]
|
||||
***** xref:api/clients/functions/vertexai-gemini-chat-functions.adoc[Function Calling]
|
||||
*** xref:api/clients/mistralai-chat.adoc[Mistral AI]
|
||||
**** xref:api/clients/functions/mistralai-chat-functions.adoc[Function Calling]
|
||||
**** xref:api/chat/bedrock/bedrock-anthropic.adoc[Anthropic]
|
||||
**** xref:api/chat/bedrock/bedrock-llama2.adoc[Llama2]
|
||||
**** xref:api/chat/bedrock/bedrock-cohere.adoc[Cohere]
|
||||
**** xref:api/chat/bedrock/bedrock-titan.adoc[Titan]
|
||||
*** xref:api/chat/huggingface.adoc[HuggingFace]
|
||||
*** xref:api/chat/google-vertexai.adoc[Google VertexAI]
|
||||
**** xref:api/chat/vertexai-palm2-chat.adoc[VertexAI PaLM2 ]
|
||||
**** xref:api/chat/vertexai-gemini-chat.adoc[VertexAI Gemini]
|
||||
***** xref:api/chat/functions/vertexai-gemini-chat-functions.adoc[Function Calling]
|
||||
*** xref:api/chat/mistralai-chat.adoc[Mistral AI]
|
||||
**** xref:api/chat/functions/mistralai-chat-functions.adoc[Function Calling]
|
||||
** xref:api/embeddings.adoc[]
|
||||
*** xref:api/embeddings/openai-embeddings.adoc[OpenAI]
|
||||
*** xref:api/embeddings/ollama-embeddings.adoc[Ollama]
|
||||
@@ -32,8 +32,8 @@
|
||||
*** xref:api/embeddings/onnx.adoc[Transformers (ONNX)]
|
||||
*** xref:api/embeddings/mistralai-embeddings.adoc[Mistral AI]
|
||||
** xref:api/imageclient.adoc[]
|
||||
*** xref:api/clients/image/openai-image.adoc[OpenAI]
|
||||
*** xref:api/clients/image/stabilityai-image.adoc[Stability]
|
||||
*** xref:api/image/openai-image.adoc[OpenAI]
|
||||
*** xref:api/image/stabilityai-image.adoc[Stability]
|
||||
** xref:api/transcriptions.adoc[]
|
||||
*** xref:api/transcriptions/openai-transcriptions.adoc[OpenAI]
|
||||
** xref:api/vectordbs.adoc[]
|
||||
|
||||
@@ -84,11 +84,11 @@ Next, you can use the `spring.ai.bedrock.<model>.<chat|embedding>.*` properties
|
||||
|
||||
For more information, refer to the documentation below for each supported model.
|
||||
|
||||
* xref:api/clients/bedrock/bedrock-anthropic.adoc[Spring AI Bedrock Anthropic Chat]: `spring.ai.bedrock.anthropic.chat.enabled=true`
|
||||
* xref:api/clients/bedrock/bedrock-llama2.adoc[Spring AI Bedrock Llama2 Chat]: `spring.ai.bedrock.llama2.chat.enabled=true`
|
||||
* xref:api/clients/bedrock/bedrock-cohere.adoc[Spring AI Bedrock Cohere Chat]: `spring.ai.bedrock.cohere.chat.enabled=true`
|
||||
* xref:api/chat/bedrock/bedrock-anthropic.adoc[Spring AI Bedrock Anthropic Chat]: `spring.ai.bedrock.anthropic.chat.enabled=true`
|
||||
* xref:api/chat/bedrock/bedrock-llama2.adoc[Spring AI Bedrock Llama2 Chat]: `spring.ai.bedrock.llama2.chat.enabled=true`
|
||||
* xref:api/chat/bedrock/bedrock-cohere.adoc[Spring AI Bedrock Cohere Chat]: `spring.ai.bedrock.cohere.chat.enabled=true`
|
||||
* xref:api/embeddings/bedrock-cohere-embedding.adoc[Spring AI Bedrock Cohere Embeddings]: `spring.ai.bedrock.cohere.embedding.enabled=true`
|
||||
* xref:api/clients/bedrock/bedrock-titan.adoc[Spring AI Bedrock Titan Chat]: `spring.ai.bedrock.titan.chat.enabled=true`
|
||||
* xref:api/chat/bedrock/bedrock-titan.adoc[Spring AI Bedrock Titan Chat]: `spring.ai.bedrock.titan.chat.enabled=true`
|
||||
* xref:api/embeddings/bedrock-titan-embedding.adoc[Spring AI Bedrock Titan Embeddings]: `spring.ai.bedrock.titan.embedding.enabled=true`
|
||||
|
||||
// * xref:api/clients/bedrock/bedrock-jurassic2-chat.adoc[(WIP)Spring AI Bedrock Jurassic Chat]: `spring.ai.bedrock.jurassic2.chat.enabled=true`
|
||||
// * xref:api/chat/bedrock/bedrock-jurassic2-chat.adoc[(WIP)Spring AI Bedrock Jurassic Chat]: `spring.ai.bedrock.jurassic2.chat.enabled=true`
|
||||
|
||||
@@ -111,7 +111,7 @@ Deployments model name to provide as part of this completions request.
|
||||
|
||||
TIP: All properties prefixed with `spring.ai.azure.openai.chat.options` can be overridden at runtime by adding a request specific <<chat-options>> to the `Prompt` call.
|
||||
|
||||
=== Chat Options [[chat-options]]
|
||||
== Runtime Options [[chat-options]]
|
||||
|
||||
The link:https://github.com/spring-projects/spring-ai/blob/main/models/spring-ai-azure-openai/src/main/java/org/springframework/ai/azure/openai/AzureOpenAiChatOptions.java[AzureOpenAiChatOptions.java] provides model configurations, such as the model to use, the temperature, the frequency penalty, etc.
|
||||
|
||||
@@ -135,13 +135,13 @@ ChatResponse response = chatClient.call(
|
||||
TIP: In addition to the model specific link:https://github.com/spring-projects/spring-ai/blob/main/models/spring-ai-azure-openai/src/main/java/org/springframework/ai/azure/openai/AzureOpenAiChatOptions.java[AzureOpenAiChatOptions.java] you can use a portable https://github.com/spring-projects/spring-ai/blob/main/spring-ai-core/src/main/java/org/springframework/ai/chat/ChatOptions.java[ChatOptions] instance, created with the https://github.com/spring-projects/spring-ai/blob/main/spring-ai-core/src/main/java/org/springframework/ai/chat/ChatOptionsBuilder.java[ChatOptionsBuilder#builder()].
|
||||
|
||||
|
||||
=== Function Calling
|
||||
== Function Calling
|
||||
|
||||
You can register custom Java functions with the AzureOpenAiChatClient and have the model intelligently choose to output a JSON object containing arguments to call one or many of the registered functions.
|
||||
This is a powerful technique to connect the LLM capabilities with external tools and APIs.
|
||||
Read more about xref:api/clients/functions/azure-open-ai-chat-functions.adoc[Azure OpenAI Function Calling].
|
||||
Read more about xref:api/chat/functions/azure-open-ai-chat-functions.adoc[Azure OpenAI Function Calling].
|
||||
|
||||
=== Sample Controller (Auto-configuration)
|
||||
== Sample Controller
|
||||
|
||||
https://start.spring.io/[Create] a new Spring Boot project and add the `spring-ai-azure-openai-spring-boot-starter` to your pom (or gradle) dependencies.
|
||||
|
||||
@@ -210,7 +210,7 @@ dependencies {
|
||||
|
||||
TIP: Refer to the xref:getting-started.adoc#dependency-management[Dependency Management] section to add the Spring AI BOM to your build file.
|
||||
|
||||
TIP: The `spring-ai-azure-openai` dependency also provide the access to the `AzureOpenAiChatClient`. For more information about the `AzureOpenAiChatClient` refer to the link:../clients/azure-openai-chat.html[Azure OpenAI Chat] section.
|
||||
TIP: The `spring-ai-azure-openai` dependency also provide the access to the `AzureOpenAiChatClient`. For more information about the `AzureOpenAiChatClient` refer to the link:../chat/azure-openai-chat.html[Azure OpenAI Chat] section.
|
||||
|
||||
Next, create an `AzureOpenAiChatClient` instance and use it to generate text responses:
|
||||
|
||||
@@ -89,7 +89,7 @@ Model ID values can also be found in the https://docs.aws.amazon.com/bedrock/lat
|
||||
|
||||
TIP: All properties prefixed with `spring.ai.bedrock.anthropic.chat.options` can be overridden at runtime by adding a request specific <<chat-options>> to the `Prompt` call.
|
||||
|
||||
=== Chat Options [[chat-options]]
|
||||
== Runtime Options [[chat-options]]
|
||||
|
||||
The https://github.com/spring-projects/spring-ai/blob/main/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/anthropic/AnthropicChatOptions.java[AnthropicChatOptions.java] provides model configurations, such as temperature, topK, topP, etc.
|
||||
|
||||
@@ -111,7 +111,7 @@ ChatResponse response = chatClient.call(
|
||||
|
||||
TIP: In addition to the model specific https://github.com/spring-projects/spring-ai/blob/main/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/anthropic/AnthropicChatOptions.java[AnthropicChatOptions] you can use a portable https://github.com/spring-projects/spring-ai/blob/main/spring-ai-core/src/main/java/org/springframework/ai/chat/ChatOptions.java[ChatOptions] instance, created with the https://github.com/spring-projects/spring-ai/blob/main/spring-ai-core/src/main/java/org/springframework/ai/chat/ChatOptionsBuilder.java[ChatOptionsBuilder#builder()].
|
||||
|
||||
=== Sample Controller (Auto-configuration)
|
||||
== Sample Controller
|
||||
|
||||
https://start.spring.io/[Create] a new Spring Boot project and add the `spring-ai-bedrock-ai-spring-boot-starter` to your pom (or gradle) dependencies.
|
||||
|
||||
@@ -88,7 +88,7 @@ Model ID values can also be found in the https://docs.aws.amazon.com/bedrock/lat
|
||||
|
||||
TIP: All properties prefixed with `spring.ai.bedrock.cohere.chat.options` can be overridden at runtime by adding a request specific <<chat-options>> to the `Prompt` call.
|
||||
|
||||
=== Chat Options [[chat-options]]
|
||||
== Runtime Options [[chat-options]]
|
||||
|
||||
The https://github.com/spring-projects/spring-ai/blob/main/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/cohere/BedrockCohereChatOptions.java[BedrockCohereChatOptions.java] provides model configurations, such as temperature, topK, topP, etc.
|
||||
|
||||
@@ -110,7 +110,7 @@ ChatResponse response = chatClient.call(
|
||||
|
||||
TIP: In addition to the model specific https://github.com/spring-projects/spring-ai/blob/main/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/cohere/BedrockCohereChatOptions.java[BedrockCohereChatOptions] you can use a portable https://github.com/spring-projects/spring-ai/blob/main/spring-ai-core/src/main/java/org/springframework/ai/chat/ChatOptions.java[ChatOptions] instance, created with the https://github.com/spring-projects/spring-ai/blob/main/spring-ai-core/src/main/java/org/springframework/ai/chat/ChatOptionsBuilder.java[ChatOptionsBuilder#builder()].
|
||||
|
||||
=== Sample Controller (Auto-configuration)
|
||||
== Sample Controller
|
||||
|
||||
https://start.spring.io/[Create] a new Spring Boot project and add the `spring-ai-bedrock-ai-spring-boot-starter` to your pom (or gradle) dependencies.
|
||||
|
||||
@@ -86,7 +86,7 @@ Model ID values can also be found in the https://docs.aws.amazon.com/bedrock/lat
|
||||
|
||||
TIP: All properties prefixed with `spring.ai.bedrock.llama2.chat.options` can be overridden at runtime by adding a request specific <<chat-options>> to the `Prompt` call.
|
||||
|
||||
=== Chat Options [[chat-options]]
|
||||
== Runtime Options [[chat-options]]
|
||||
|
||||
The https://github.com/spring-projects/spring-ai/blob/main/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/llama2/BedrockLlama2ChatOptions.java[BedrockLlama2ChatOptions.java] provides model configurations, such as temperature, topK, topP, etc.
|
||||
|
||||
@@ -108,7 +108,7 @@ ChatResponse response = chatClient.call(
|
||||
|
||||
TIP: In addition to the model specific https://github.com/spring-projects/spring-ai/blob/main/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/llama2/BedrockLlama2ChatOptions.java[BedrockLlama2ChatOptions] you can use a portable https://github.com/spring-projects/spring-ai/blob/main/spring-ai-core/src/main/java/org/springframework/ai/chat/ChatOptions.java[ChatOptions] instance, created with the https://github.com/spring-projects/spring-ai/blob/main/spring-ai-core/src/main/java/org/springframework/ai/chat/ChatOptionsBuilder.java[ChatOptionsBuilder#builder()].
|
||||
|
||||
=== Sample Controller (Auto-configuration)
|
||||
== Sample Controller
|
||||
|
||||
https://start.spring.io/[Create] a new Spring Boot project and add the `spring-ai-bedrock-ai-spring-boot-starter` to your pom (or gradle) dependencies.
|
||||
|
||||
@@ -84,7 +84,7 @@ Model ID values can also be found in the https://docs.aws.amazon.com/bedrock/lat
|
||||
|
||||
TIP: All properties prefixed with `spring.ai.bedrock.titan.chat.options` can be overridden at runtime by adding a request specific <<chat-options>> to the `Prompt` call.
|
||||
|
||||
=== Chat Options [[chat-options]]
|
||||
== Runtime Options [[chat-options]]
|
||||
|
||||
The https://github.com/spring-projects/spring-ai/blob/main/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/titan/BedrockTitanChatOptions.java[BedrockTitanChatOptions.java] provides model configurations, such as temperature, topP, etc.
|
||||
|
||||
@@ -106,7 +106,7 @@ ChatResponse response = chatClient.call(
|
||||
|
||||
TIP: In addition to the model specific https://github.com/spring-projects/spring-ai/blob/main/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/titan/BedrockTitanChatOptions.java[BedrockTitanChatOptions] you can use a portable https://github.com/spring-projects/spring-ai/blob/main/spring-ai-core/src/main/java/org/springframework/ai/chat/ChatOptions.java[ChatOptions] instance, created with the https://github.com/spring-projects/spring-ai/blob/main/spring-ai-core/src/main/java/org/springframework/ai/chat/ChatOptionsBuilder.java[ChatOptionsBuilder#builder()].
|
||||
|
||||
=== Sample Controller (Auto-configuration)
|
||||
== Sample Controller
|
||||
|
||||
https://start.spring.io/[Create] a new Spring Boot project and add the `spring-ai-bedrock-ai-spring-boot-starter` to your pom (or gradle) dependencies.
|
||||
|
||||
@@ -201,7 +201,7 @@ Flux<ChatResponse> response = chatClient.stream(
|
||||
new Prompt("Generate the names of 5 famous pirates."));
|
||||
----
|
||||
|
||||
=== Low-level TitanChatBedrockApi Client [[low-level-api]]
|
||||
== Low-level TitanChatBedrockApi Client [[low-level-api]]
|
||||
|
||||
The https://github.com/spring-projects/spring-ai/blob/main/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/titan/api/TitanChatBedrockApi.java[TitanChatBedrockApi] provides is lightweight Java client on top of AWS Bedrock link:https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters-titan-text.html[Bedrock Titan models].
|
||||
|
||||
@@ -5,5 +5,5 @@ link:https://cloud.google.com/vertex-ai/docs/reference[VertexAI API] provides hi
|
||||
|
||||
Spring AI provides integration with VertexAI API through the following clients:
|
||||
|
||||
* xref:api/clients/vertexai-palm2-chat.adoc[]
|
||||
* xref:api/clients/vertexai-gemini-chat.adoc[]
|
||||
* xref:api/chat/vertexai-palm2-chat.adoc[]
|
||||
* xref:api/chat/vertexai-gemini-chat.adoc[]
|
||||
@@ -108,7 +108,7 @@ This is useful if you want to use different MistralAI accounts for different mod
|
||||
|
||||
TIP: All properties prefixed with `spring.ai.mistralai.chat.options` can be overridden at runtime by adding a request specific <<chat-options>> to the `Prompt` call.
|
||||
|
||||
== Chat Options [[chat-options]]
|
||||
== Runtime Options [[chat-options]]
|
||||
|
||||
The link:https://github.com/spring-projects/spring-ai/blob/main/models/spring-ai-mistral-ai/src/main/java/org/springframework/ai/mistralai/MistralAiChatOptions.java[MistralAiChatOptions.java] provides model configurations, such as the model to use, the temperature, the frequency penalty, etc.
|
||||
|
||||
@@ -135,7 +135,7 @@ TIP: In addition to the model specific link:https://github.com/spring-projects/s
|
||||
|
||||
You can register custom Java functions with the MistralAiChatClient and have the Mistral AI model intelligently choose to output a JSON object containing arguments to call one or many of the registered functions.
|
||||
This is a powerful technique to connect the LLM capabilities with external tools and APIs.
|
||||
Read more about xref:api/clients/functions/mistralai-chat-functions.adoc[Mistral AI Function Calling].
|
||||
Read more about xref:api/chat/functions/mistralai-chat-functions.adoc[Mistral AI Function Calling].
|
||||
|
||||
== Sample Controller (Auto-configuration)
|
||||
|
||||
@@ -102,7 +102,7 @@ NOTE: The list of options for chat is to be reviewed. This https://github.com/sp
|
||||
|
||||
TIP: All properties prefixed with `spring.ai.ollama.chat.options` can be overridden at runtime by adding a request specific <<chat-options>> to the `Prompt` call.
|
||||
|
||||
=== Chat Options [[chat-options]]
|
||||
== Runtime Options [[chat-options]]
|
||||
|
||||
The https://github.com/spring-projects/spring-ai/blob/main/models/spring-ai-ollama/src/main/java/org/springframework/ai/ollama/api/OllamaOptions.java[OllamaOptions.java] provides model configurations, such as the model to use, the temperature, etc.
|
||||
|
||||
@@ -124,7 +124,7 @@ ChatResponse response = chatClient.call(
|
||||
|
||||
TIP: In addition to the model specific link:https://github.com/spring-projects/spring-ai/blob/main/models/spring-ai-ollama/src/main/java/org/springframework/ai/ollama/api/OllamaOptions.java[OllamaOptions] you can use a portable https://github.com/spring-projects/spring-ai/blob/main/spring-ai-core/src/main/java/org/springframework/ai/chat/ChatOptions.java[ChatOptions] instance, created with the https://github.com/spring-projects/spring-ai/blob/main/spring-ai-core/src/main/java/org/springframework/ai/chat/ChatOptionsBuilder.java[ChatOptionsBuilder#builder()].
|
||||
|
||||
=== Sample Controller (Auto-configuration)
|
||||
== Sample Controller
|
||||
|
||||
https://start.spring.io/[Create] a new Spring Boot project and add the `spring-ai-openai-spring-boot-starter` to your pom (or gradle) dependencies.
|
||||
|
||||
@@ -218,7 +218,7 @@ Flux<ChatResponse> response = chatClient.stream(
|
||||
|
||||
The `OllamaOptions` provides the configuration information for all chat requests.
|
||||
|
||||
=== Low-level OpenAiApi Client [[low-level-api]]
|
||||
== Low-level OpenAiApi Client [[low-level-api]]
|
||||
|
||||
The link:https://github.com/spring-projects/spring-ai/blob/main/models/spring-ai-ollama/src/main/java/org/springframework/ai/ollama/api/OllamaApi.java[OllamaApi] provides is lightweight Java client for Ollama Chat API link:https://github.com/ollama/ollama/blob/main/docs/api.md#generate-a-chat-completion[Ollama Chat Completion API].
|
||||
|
||||
@@ -112,7 +112,7 @@ This is useful if you want to use different OpenAI accounts for different models
|
||||
|
||||
TIP: All properties prefixed with `spring.ai.openai.chat.options` can be overridden at runtime by adding a request specific <<chat-options>> to the `Prompt` call.
|
||||
|
||||
== Chat Options [[chat-options]]
|
||||
== Runtime Options [[chat-options]]
|
||||
|
||||
The https://github.com/spring-projects/spring-ai/blob/main/models/spring-ai-openai/src/main/java/org/springframework/ai/openai/OpenAiChatOptions.java[OpenAiChatOptions.java] provides model configurations, such as the model to use, the temperature, the frequency penalty, etc.
|
||||
|
||||
@@ -139,9 +139,9 @@ TIP: In addition to the model specific https://github.com/spring-projects/spring
|
||||
|
||||
You can register custom Java functions with the OpenAiChatClient and have the OpenAI model intelligently choose to output a JSON object containing arguments to call one or many of the registered functions.
|
||||
This is a powerful technique to connect the LLM capabilities with external tools and APIs.
|
||||
Read more about xref:api/clients/functions/openai-chat-functions.adoc[OpenAI Function Calling].
|
||||
Read more about xref:api/chat/functions/openai-chat-functions.adoc[OpenAI Function Calling].
|
||||
|
||||
== Sample Controller (Auto-configuration)
|
||||
== Sample Controller
|
||||
|
||||
https://start.spring.io/[Create] a new Spring Boot project and add the `spring-ai-openai-spring-boot-starter` to your pom (or gradle) dependencies.
|
||||
|
||||
@@ -233,7 +233,7 @@ Flux<ChatResponse> response = chatClient.stream(
|
||||
The `OpenAiChatOptions` provides the configuration information for the chat requests.
|
||||
The `OpenAiChatOptions.Builder` is fluent options builder.
|
||||
|
||||
=== Low-level OpenAiApi Client [[low-level-api]]
|
||||
== Low-level OpenAiApi Client [[low-level-api]]
|
||||
|
||||
The https://github.com/spring-projects/spring-ai/blob/main/models/spring-ai-openai/src/main/java/org/springframework/ai/openai/api/OpenAiApi.java[OpenAiApi] provides is lightweight Java client for OpenAI Chat API link:https://platform.openai.com/docs/api-reference/chat[OpenAI Chat API].
|
||||
|
||||
@@ -262,7 +262,7 @@ Flux<ChatCompletionChunk> streamResponse = openAiApi.chatCompletionStream(
|
||||
|
||||
Follow the https://github.com/spring-projects/spring-ai/blob/main/models/spring-ai-openai/src/main/java/org/springframework/ai/openai/api/OpenAiApi.java[OpenAiApi.java]'s JavaDoc for further information.
|
||||
|
||||
== Example Code
|
||||
=== Low-level API Examples
|
||||
* The link:https://github.com/spring-projects/spring-ai/blob/main/models/spring-ai-openai/src/test/java/org/springframework/ai/openai/chat/api/OpenAiApiIT.java[OpenAiApiIT.java] test provides some general examples how to use the lightweight library.
|
||||
|
||||
* The link:https://github.com/spring-projects/spring-ai/blob/main/models/spring-ai-openai/src/test/java/org/springframework/ai/openai/chat/api/tool/OpenAiApiToolFunctionCallIT.java[OpenAiApiToolFunctionCallIT.java] test shows how to use the low-level API to call tool functions.
|
||||
@@ -103,7 +103,7 @@ TIP: In addition to the model specific `VertexAiChatPaLm2Options` you can use a
|
||||
|
||||
You can register custom Java functions with the VertexAiGeminiChatClient and have the Gemini Pro model intelligently choose to output a JSON object containing arguments to call one or many of the registered functions.
|
||||
This is a powerful technique to connect the LLM capabilities with external tools and APIs.
|
||||
Read more about xref:api/clients/functions/vertexai-gemini-chat-functions.adoc[Vertex AI Gemini Function Calling].
|
||||
Read more about xref:api/chat/functions/vertexai-gemini-chat-functions.adoc[Vertex AI Gemini Function Calling].
|
||||
|
||||
== Multimodal
|
||||
Multimodality refers to a model's ability to simultaneously understand and process information from various sources, including text, images, audio, and other data formats. This paradigm represents a significant advancement in AI models.
|
||||
@@ -77,7 +77,7 @@ The prefix `spring.ai.vertex.ai.chat` is the property prefix that lets you confi
|
||||
|
||||
TIP: All properties prefixed with `spring.ai.vertex.ai.chat.options` can be overridden at runtime by adding a request specific <<chat-options>> to the `Prompt` call.
|
||||
|
||||
=== Chat Options [[chat-options]]
|
||||
== Runtime Options [[chat-options]]
|
||||
|
||||
The https://github.com/spring-projects/spring-ai/blob/main/models/spring-ai-vertex-ai-palm2/src/main/java/org/springframework/ai/vertexai/palm2/VertexAiPaLm2ChatOptions.java[VertexAiPaLm2ChatOptions.java] provides model configurations, such as the temperature, the topK, etc.
|
||||
|
||||
@@ -99,7 +99,7 @@ ChatResponse response = chatClient.call(
|
||||
|
||||
TIP: In addition to the model specific `VertexAiPaLm2ChatOptions` you can use a portable https://github.com/spring-projects/spring-ai/blob/main/spring-ai-core/src/main/java/org/springframework/ai/chat/ChatOptions.java[ChatOptions] instance, created with the https://github.com/spring-projects/spring-ai/blob/main/spring-ai-core/src/main/java/org/springframework/ai/chat/ChatOptionsBuilder.java[ChatOptionsBuilder#builder()].
|
||||
|
||||
=== Sample Controller (Auto-configuration)
|
||||
== Sample Controller
|
||||
|
||||
https://start.spring.io/[Create] a new Spring Boot project and add the `spring-ai-vertex-ai-palm2-spring-boot-starter` to your pom (or gradle) dependencies.
|
||||
|
||||
@@ -175,18 +175,18 @@ The `ChatClient` and `StreamingChatClient` implementations are provided for the
|
||||
|
||||
image::spring-ai-chat-completions-clients.jpg[align="center", width="800px"]
|
||||
|
||||
* xref:api/clients/openai-chat.adoc[OpenAI Chat Completion] (streaming & function-calling support)
|
||||
* xref:api/clients/azure-openai-chat.adoc[Microsoft Azure Open AI Chat Completion] (streaming & function-calling support)
|
||||
* xref:api/clients/ollama-chat.adoc[Ollama Chat Completion]
|
||||
* xref:api/clients/huggingface.adoc[HuggingFace Chat Completion] (no streaming support)
|
||||
* xref:api/clients/vertexai-palm2-chat.adoc[Google Vertex AI PaLM2 Chat Completion] (no streaming support)
|
||||
* xref:api/clients/vertexai-gemini-chat.adoc[Google Vertex AI Gemini Chat Completion] (streaming, multi-modality & function-calling support)
|
||||
* xref:api/chat/openai-chat.adoc[OpenAI Chat Completion] (streaming & function-calling support)
|
||||
* xref:api/chat/azure-openai-chat.adoc[Microsoft Azure Open AI Chat Completion] (streaming & function-calling support)
|
||||
* xref:api/chat/ollama-chat.adoc[Ollama Chat Completion]
|
||||
* xref:api/chat/huggingface.adoc[HuggingFace Chat Completion] (no streaming support)
|
||||
* xref:api/chat/vertexai-palm2-chat.adoc[Google Vertex AI PaLM2 Chat Completion] (no streaming support)
|
||||
* xref:api/chat/vertexai-gemini-chat.adoc[Google Vertex AI Gemini Chat Completion] (streaming, multi-modality & function-calling support)
|
||||
* xref:api/bedrock.adoc[Amazon Bedrock]
|
||||
** xref:api/clients/bedrock/bedrock-cohere.adoc[Cohere Chat Completion]
|
||||
** xref:api/clients/bedrock/bedrock-llama2.adoc[Llama2 Chat Completion]
|
||||
** xref:api/clients/bedrock/bedrock-titan.adoc[Titan Chat Completion]
|
||||
** xref:api/clients/bedrock/bedrock-anthropic.adoc[Anthropic Chat Completion]
|
||||
* xref:api/clients/mistralai-chat.adoc[Mistral AI Chat Completion] (streaming & function-calling support)
|
||||
** xref:api/chat/bedrock/bedrock-cohere.adoc[Cohere Chat Completion]
|
||||
** xref:api/chat/bedrock/bedrock-llama2.adoc[Llama2 Chat Completion]
|
||||
** xref:api/chat/bedrock/bedrock-titan.adoc[Titan Chat Completion]
|
||||
** xref:api/chat/bedrock/bedrock-anthropic.adoc[Anthropic Chat Completion]
|
||||
* xref:api/chat/mistralai-chat.adoc[Mistral AI Chat Completion] (streaming & function-calling support)
|
||||
|
||||
== Chat Model API
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ The prefix `spring.ai.azure.openai.embeddings` is the property prefix that confi
|
||||
|
||||
TIP: All properties prefixed with `spring.ai.azure.openai.embedding.options` can be overridden at runtime by adding a request specific <<embedding-options>> to the `EmbeddingRequest` call.
|
||||
|
||||
=== Embedding Options [[embedding-options]]
|
||||
== Runtime Options [[embedding-options]]
|
||||
|
||||
The `AzureOpenAiEmbeddingOptions` provides the configuration information for the embedding requests.
|
||||
The `AzureOpenAiEmbeddingOptions` offers a builder to create the options.
|
||||
@@ -100,7 +100,7 @@ EmbeddingResponse embeddingResponse = embeddingClient.call(
|
||||
----
|
||||
|
||||
|
||||
=== Sample Code
|
||||
== Sample Code
|
||||
|
||||
This will create a `EmbeddingClient` implementation that you can inject into your class.
|
||||
Here is an example of a simple `@Controller` class that uses the `EmbeddingClient` implementation.
|
||||
|
||||
@@ -79,7 +79,7 @@ Model ID values can also be found in the https://docs.aws.amazon.com/bedrock/lat
|
||||
|
||||
TIP: All properties prefixed with `spring.ai.bedrock.cohere.embedding.options` can be overridden at runtime by adding a request specific <<embedding-options>> to the `EmbeddingRequest` call.
|
||||
|
||||
=== Embedding Options [[embedding-options]]
|
||||
== Runtime Options [[embedding-options]]
|
||||
|
||||
The https://github.com/spring-projects/spring-ai/blob/main/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/cohere/BedrockCohereEmbeddingOptions.java[BedrockCohereEmbeddingOptions.java] provides model configurations, such as `input-type` or `truncate`.
|
||||
|
||||
@@ -97,7 +97,7 @@ EmbeddingResponse embeddingResponse = embeddingClient.call(
|
||||
.build()));
|
||||
----
|
||||
|
||||
=== Sample Controller (Auto-configuration)
|
||||
== Sample Controller
|
||||
|
||||
https://start.spring.io/[Create] a new Spring Boot project and add the `spring-ai-bedrock-ai-spring-boot-starter` to your pom (or gradle) dependencies.
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ Supported values are: `amazon.titan-embed-image-v1` and `amazon.titan-embed-text
|
||||
Model ID values can also be found in the https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids-arns.html[AWS Bedrock documentation for base model IDs].
|
||||
|
||||
|
||||
=== Sample Controller (Auto-configuration)
|
||||
== Sample Controller
|
||||
|
||||
https://start.spring.io/[Create] a new Spring Boot project and add the `spring-ai-bedrock-ai-spring-boot-starter` to your pom (or gradle) dependencies.
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@ This is useful if you want to use different MistralAI accounts for different mod
|
||||
|
||||
TIP: All properties prefixed with `spring.ai.mistralai.embedding.options` can be overridden at runtime by adding a request specific <<embedding-options>> to the `EmbeddingRequest` call.
|
||||
|
||||
=== Embedding Options [[embedding-options]]
|
||||
== Runtime Options [[embedding-options]]
|
||||
|
||||
The https://github.com/spring-projects/spring-ai/blob/main/models/spring-ai-mistral-ai/src/main/java/org/springframework/ai/mistralai/MistralAiEmbeddingOptions.java[MistralAiEmbeddingOptions.java] provides the MistralAI configurations, such as the model to use and etc.
|
||||
|
||||
@@ -120,7 +120,7 @@ EmbeddingResponse embeddingResponse = embeddingClient.call(
|
||||
.build()));
|
||||
----
|
||||
|
||||
=== Sample Controller (Auto-configuration)
|
||||
== Sample Controller
|
||||
|
||||
This will create a `EmbeddingClient` implementation that you can inject into your class.
|
||||
Here is an example of a simple `@Controller` class that uses the `EmbeddingClient` implementation.
|
||||
@@ -175,7 +175,7 @@ dependencies {
|
||||
TIP: Refer to the xref:getting-started.adoc#dependency-management[Dependency Management] section to add the Spring AI BOM to your build file.
|
||||
|
||||
NOTE: The `spring-ai-mistralai` dependency provides access also to the `MistralAiChatClient`.
|
||||
For more information about the `MistralAiChatClient` refer to the link:../clients/mistralai-chat.html[MistralAI Chat Client] section.
|
||||
For more information about the `MistralAiChatClient` refer to the link:../chat/mistralai-chat.html[MistralAI Chat Client] section.
|
||||
|
||||
Next, create an `MistralAiEmbeddingClient` instance and use it to compute the similarity between two input texts:
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ NOTE: The `spring.ai.ollama.embedding.options.*` properties are based on the htt
|
||||
|
||||
TIP: All properties prefixed with `spring.ai.ollama.embedding.options` can be overridden at runtime by adding a request specific <<embedding-options>> to the `EmbeddingRequest` call.
|
||||
|
||||
=== Embedding Options [[embedding-options]]
|
||||
== Runtime Options [[embedding-options]]
|
||||
|
||||
The https://github.com/spring-projects/spring-ai/blob/main/models/spring-ai-ollama/src/main/java/org/springframework/ai/ollama/api/OllamaOptions.java[OllamaOptions.java] provides the Ollama configurations, such as the model to use, the low level GPU and CPU tuning, etc.
|
||||
|
||||
@@ -127,7 +127,7 @@ EmbeddingResponse embeddingResponse = embeddingClient.call(
|
||||
.withModel("Different-Embedding-Model-Deployment-Name"));
|
||||
----
|
||||
|
||||
=== Sample Controller (Auto-configuration)
|
||||
== Sample Controller
|
||||
|
||||
This will create a `EmbeddingClient` implementation that you can inject into your class.
|
||||
Here is an example of a simple `@Controller` class that uses the `EmbeddingClient` implementation.
|
||||
@@ -177,7 +177,7 @@ dependencies {
|
||||
TIP: Refer to the xref:getting-started.adoc#dependency-management[Dependency Management] section to add the Spring AI BOM to your build file.
|
||||
|
||||
NOTE: The `spring-ai-ollama` dependency provides access also to the `OllamaChatClient`.
|
||||
For more information about the `OllamaChatClient` refer to the link:../clients/ollama-chat.html[Ollama Chat Client] section.
|
||||
For more information about the `OllamaChatClient` refer to the link:../chat/ollama-chat.html[Ollama Chat Client] section.
|
||||
|
||||
Next, create an `OllamaEmbeddingClient` instance and use it to compute the similarity between two input texts:
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ This is useful if you want to use different OpenAI accounts for different models
|
||||
|
||||
TIP: All properties prefixed with `spring.ai.openai.embedding.options` can be overridden at runtime by adding a request specific <<embedding-options>> to the `EmbeddingRequest` call.
|
||||
|
||||
=== Embedding Options [[embedding-options]]
|
||||
== Runtime Options [[embedding-options]]
|
||||
|
||||
The https://github.com/spring-projects/spring-ai/blob/main/models/spring-ai-openai/src/main/java/org/springframework/ai/openai/OpenAiEmbeddingOptions.java[OpenAiEmbeddingOptions.java] provides the OpenAI configurations, such as the model to use and etc.
|
||||
|
||||
@@ -122,7 +122,7 @@ EmbeddingResponse embeddingResponse = embeddingClient.call(
|
||||
.build()));
|
||||
----
|
||||
|
||||
=== Sample Controller (Auto-configuration)
|
||||
== Sample Controller
|
||||
|
||||
This will create a `EmbeddingClient` implementation that you can inject into your class.
|
||||
Here is an example of a simple `@Controller` class that uses the `EmbeddingClient` implementation.
|
||||
@@ -177,7 +177,7 @@ dependencies {
|
||||
TIP: Refer to the xref:getting-started.adoc#dependency-management[Dependency Management] section to add the Spring AI BOM to your build file.
|
||||
|
||||
NOTE: The `spring-ai-openai` dependency provides access also to the `OpenAiChatClient`.
|
||||
For more information about the `OpenAiChatClient` refer to the link:../clients/openai-chat.html[OpenAI Chat Client] section.
|
||||
For more information about the `OpenAiChatClient` refer to the link:../chat/openai-chat.html[OpenAI Chat Client] section.
|
||||
|
||||
Next, create an `OpenAiEmbeddingClient` instance and use it to compute the similarity between two input texts:
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ The prefix `spring.ai.postgresml.embedding` is property prefix that configures t
|
||||
|
||||
TIP: All properties prefixed with `spring.ai.postgresml.embedding.options` can be overridden at runtime by adding a request specific <<embedding-options>> to the `EmbeddingRequest` call.
|
||||
|
||||
=== EmbeddingOptions [[embedding-options]]
|
||||
== Runtime Options [[embedding-options]]
|
||||
|
||||
Use the https://github.com/spring-projects/spring-ai/blob/main/models/spring-ai-openai/src/main/java/org/springframework/ai/postgresml/PostgresMlEmbeddingOptions.java[PostgresMlEmbeddingOptions.java] to configure the `PostgresMlEmbeddingClient` with options, such as the model to use and etc.
|
||||
|
||||
@@ -82,7 +82,7 @@ EmbeddingResponse embeddingResponse = embeddingClient.call(
|
||||
.build()));
|
||||
----
|
||||
|
||||
=== Sample Controller (Auto-configuration)
|
||||
== Sample Controller
|
||||
|
||||
This will create a `EmbeddingClient` implementation that you can inject into your class.
|
||||
Here is an example of a simple `@Controller` class that uses the `EmbeddingClient` implementation.
|
||||
|
||||
@@ -72,7 +72,7 @@ The prefix `spring.ai.vertex.ai.embedding` is the property prefix that lets you
|
||||
|====
|
||||
|
||||
|
||||
=== Sample Controller (Auto-configuration)
|
||||
== Sample Controller
|
||||
|
||||
https://start.spring.io/[Create] a new Spring Boot project and add the `spring-ai-vertex-ai-palm2-spring-boot-starter` to your pom (or gradle) dependencies.
|
||||
|
||||
@@ -146,7 +146,7 @@ EmbeddingResponse embeddingResponse = embeddingClient
|
||||
.embedForResponse(List.of("Hello World", "World is big and salvation is near"));
|
||||
----
|
||||
|
||||
=== Low-level VertexAiPaLm2Api Client [[low-level-api]]
|
||||
== Low-level VertexAiPaLm2Api Client [[low-level-api]]
|
||||
|
||||
The https://github.com/spring-projects/spring-ai/blob/main/models/spring-ai-vertex-ai-palm2/src/main/java/org/springframework/ai/vertexai/palm2/api/VertexAiPaLm2Api.java[VertexAiPaLm2Api] provides is lightweight Java client for VertexAiPaLm2Api Chat API.
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ The integration of function support in AI models, such as ChatGPT, permits the m
|
||||
|
||||
Spring AI currently supports Function invocation for the following AI Models
|
||||
|
||||
* OpenAI: Refer to the xref:api/clients/functions/openai-chat-functions.adoc[Open AI function invocation docs].
|
||||
* VertexAI Gemini: Refer to the xref:api/clients/functions/vertexai-gemini-chat-functions.adoc[Vertex AI Gemini function invocation docs].
|
||||
* Azure OpenAI: Refer to the xref:api/clients/functions/azure-open-ai-chat-functions.adoc[Azure OpenAI function invocation docs].
|
||||
* Mistral AI: Refer to the xref:api/clients/functions/mistralai-chat-functions.adoc[Mistral AI function invocation docs].
|
||||
* OpenAI: Refer to the xref:api/chat/functions/openai-chat-functions.adoc[Open AI function invocation docs].
|
||||
* VertexAI Gemini: Refer to the xref:api/chat/functions/vertexai-gemini-chat-functions.adoc[Vertex AI Gemini function invocation docs].
|
||||
* Azure OpenAI: Refer to the xref:api/chat/functions/azure-open-ai-chat-functions.adoc[Azure OpenAI function invocation docs].
|
||||
* Mistral AI: Refer to the xref:api/chat/functions/mistralai-chat-functions.adoc[Mistral AI function invocation docs].
|
||||
@@ -74,7 +74,7 @@ The prefix `spring.ai.stabilityai.image` is the property prefix that lets you co
|
||||
|====
|
||||
|
||||
|
||||
=== Image Options [[image-options]]
|
||||
== Runtime Options [[image-options]]
|
||||
|
||||
The https://github.com/spring-projects/spring-ai/blob/main/models/spring-ai-stabilityai/src/main/java/org/springframework/ai/stabilityai/api/StabilityAiImageOptions.java[StabilityAiImageOptions.java] provides model configurations, such as the model to use, the style, the size, etc.
|
||||
|
||||
@@ -159,8 +159,8 @@ public class ImageGeneration implements ModelResult<Image> {
|
||||
|
||||
`ImageClient` implementations are provided for the following Model providers:
|
||||
|
||||
* xref:api/clients/image/openai-image.adoc[OpenAI Image Generation]
|
||||
* xref:api/clients/image/stabilityai-image.adoc[StabilityAI Image Generation]
|
||||
* xref:api/image/openai-image.adoc[OpenAI Image Generation]
|
||||
* xref:api/image/stabilityai-image.adoc[StabilityAI Image Generation]
|
||||
|
||||
== API Docs
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ you'll need to develop a low-level client API class. This often involves utilizi
|
||||
`RestClient` class from the Spring Framework, similar to the `OpenAiApi` class.
|
||||
|
||||
. *Create a ModelClient implementation*
|
||||
Ensure your client conforms to the link:https://docs.spring.io/spring-ai/reference/api/clients/generic-model.html[Generic Model API].
|
||||
Ensure your client conforms to the link:https://docs.spring.io/spring-ai/reference/api/chat/generic-model.html[Generic Model API].
|
||||
Use existing request and response classes if your model's inputs and outputs are supported.
|
||||
If not, create new classes for the Generic Model API and establish a new Java package.
|
||||
|
||||
@@ -30,7 +30,7 @@ Existing tests can serve as a useful reference for structuring and implementing
|
||||
|
||||
. *Document Your Contribution*: Ensure your documentation follows the existing format,
|
||||
For an example of the suggested structure and formatting, refer to the
|
||||
link:https://docs.spring.io/spring-ai/reference/api/clients/openai-chat.html[Open AI Chat documentation].
|
||||
link:https://docs.spring.io/spring-ai/reference/api/chat/openai-chat.html[Open AI Chat documentation].
|
||||
|
||||
By following these guidelines, we can greatly expand the framework's range of supported models
|
||||
while following a common implementation and documentation pattern.
|
||||
|
||||
@@ -139,24 +139,24 @@ Each of the following sections in the documentation shows which dependencies you
|
||||
|
||||
=== Chat Models
|
||||
* xref:api/chatclient.adoc[Chat Completion API]
|
||||
** xref:api/clients/openai-chat.adoc[OpenAI Chat Completion] (streaming and function-calling support)
|
||||
** xref:api/clients/azure-openai-chat.adoc[Microsoft Azure Open AI Chat Completion] (streaming and function-calling support)
|
||||
** xref:api/clients/ollama-chat.adoc[Ollama Chat Completion]
|
||||
** xref:api/clients/huggingface.adoc[HuggingFace Chat Completion] (no streaming support)
|
||||
** xref:api/clients/vertexai-palm2-chat.adoc[Google Vertex AI PaLM2 Chat Completion] (no streaming support)
|
||||
** xref:api/clients/vertexai-gemini-chat.adoc[Google Vertex AI Gemini Chat Completion] (streaming, multi-modality & function-calling support)
|
||||
** xref:api/chat/openai-chat.adoc[OpenAI Chat Completion] (streaming and function-calling support)
|
||||
** xref:api/chat/azure-openai-chat.adoc[Microsoft Azure Open AI Chat Completion] (streaming and function-calling support)
|
||||
** xref:api/chat/ollama-chat.adoc[Ollama Chat Completion]
|
||||
** xref:api/chat/huggingface.adoc[HuggingFace Chat Completion] (no streaming support)
|
||||
** xref:api/chat/vertexai-palm2-chat.adoc[Google Vertex AI PaLM2 Chat Completion] (no streaming support)
|
||||
** xref:api/chat/vertexai-gemini-chat.adoc[Google Vertex AI Gemini Chat Completion] (streaming, multi-modality & function-calling support)
|
||||
** xref:api/bedrock.adoc[Amazon Bedrock]
|
||||
*** xref:api/clients/bedrock/bedrock-cohere.adoc[Cohere Chat Completion]
|
||||
*** xref:api/clients/bedrock/bedrock-llama2.adoc[Llama2 Chat Completion]
|
||||
*** xref:api/clients/bedrock/bedrock-titan.adoc[Titan Chat Completion]
|
||||
*** xref:api/clients/bedrock/bedrock-anthropic.adoc[Anthropic Chat Completion]
|
||||
** xref:api/clients/mistralai-chat.adoc[MistralAI Chat Completion] (streaming and function-calling support)
|
||||
// ** xref:api/clients/bedrock/bedrock-jurassic.adoc[Jurassic2 Chat Completion] (WIP, no streaming support)
|
||||
*** xref:api/chat/bedrock/bedrock-cohere.adoc[Cohere Chat Completion]
|
||||
*** xref:api/chat/bedrock/bedrock-llama2.adoc[Llama2 Chat Completion]
|
||||
*** xref:api/chat/bedrock/bedrock-titan.adoc[Titan Chat Completion]
|
||||
*** xref:api/chat/bedrock/bedrock-anthropic.adoc[Anthropic Chat Completion]
|
||||
** xref:api/chat/mistralai-chat.adoc[MistralAI Chat Completion] (streaming and function-calling support)
|
||||
// ** xref:api/chat/bedrock/bedrock-jurassic.adoc[Jurassic2 Chat Completion] (WIP, no streaming support)
|
||||
|
||||
=== Image Generation Models
|
||||
* xref:api/imageclient.adoc[]
|
||||
** xref:api/clients/image/openai-image.adoc[OpenAI Image Generation]
|
||||
** xref:api/clients/image/stabilityai-image.adoc[StabilityAI Image Generation]
|
||||
** xref:api/image/openai-image.adoc[OpenAI Image Generation]
|
||||
** xref:api/image/stabilityai-image.adoc[StabilityAI Image Generation]
|
||||
|
||||
=== Vector Databases
|
||||
* xref:api/vectordbs.adoc[Vector Database API]
|
||||
|
||||
@@ -68,7 +68,7 @@ The following OpenAi Autoconfiguration chat properties has changed
|
||||
* from `spring.ai.openai.model` to `spring.ai.openai.chat.options.model`.
|
||||
* from `spring.ai.openai.temperature` to `spring.ai.openai.chat.options.temperature`.
|
||||
|
||||
Find updated documentation about the OpenAi properties: https://docs.spring.io/spring-ai/reference/api/clients/openai-chat.html
|
||||
Find updated documentation about the OpenAi properties: https://docs.spring.io/spring-ai/reference/api/chat/openai-chat.html
|
||||
|
||||
=== December 27, 2023 Update
|
||||
|
||||
|
||||
Reference in New Issue
Block a user