Skip to content

Commit 554fbcd

Browse files
committed
minor docs improvment
1 parent 437ff74 commit 554fbcd

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

spring-ai-docs/src/main/antora/modules/ROOT/pages/api/chat/functions/ollama-chat-functions.adoc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,17 @@
22

33
TIP: You need Ollama 0.2.8 or newer.
44

5+
TIP: You need https://ollama.com/library[Models] pre-trained for Tools support.
6+
Usually, such models are tagged with a `Tools` tag.
7+
For example `mistral`, `firefunction-v2` or `llama3.1:70b`.
8+
59
NOTE: Currently, the Ollama API (0.2.8) does not support function calling in streaming mode.
610

711
You can register custom Java functions with the `OllamaChatModel` and have the Ollama deployed model intelligently choose to output a JSON object containing arguments to call one or many of the registered functions.
812
This allows you to connect the LLM capabilities with external tools and APIs.
913
The Ollama models tagged with the `Tools` label are trained to detect when a function should be called and to respond with JSON that adheres to the function signature.
1014

1115
The Ollama API does not call the function directly; instead, the model generates JSON that you can use to call the function in your code and return the result back to the model to complete the conversation.
12-
1316
Spring AI provides flexible and user-friendly ways to register and call custom functions.
1417
In general, the custom functions need to provide a function `name`, `description`, and the function call `signature` (as JSON schema) to let the model know what arguments the function expects.
1518
The `description` helps the model to understand when to call the function.

spring-ai-docs/src/main/antora/modules/ROOT/pages/api/functions.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@ Spring AI currently supports Function invocation for the following AI Models
1313
* Groq: Refer to the xref:api/chat/groq-chat.adoc#_function_calling[Groq function invocation docs].
1414
* Mistral AI: Refer to the xref:api/chat/functions/mistralai-chat-functions.adoc[Mistral AI function invocation docs].
1515
// * MiniMax : Refer to the xref:api/chat/functions/minimax-chat-functions.adoc[MiniMax function invocation docs].
16+
* Ollama: Refer to the xref:api/chat/functions/ollama-chat-functions.adoc[Ollama function invocation docs] (streeming not supported yet).
1617
* OpenAI: Refer to the xref:api/chat/functions/openai-chat-functions.adoc[Open AI function invocation docs].
1718
// * ZhiPu AI : Refer to the xref:api/chat/functions/zhipuai-chat-functions.adoc[ZhiPu AI function invocation docs].

0 commit comments

Comments
 (0)