examples: rename function to remove redundant 'chat' prefix

- Rename `ollama_chat_automatic_function_calling` to `ollama_automatic_function_calling`
- Update function call in main block to use new name
This commit is contained in:
Xinyue 2026-02-17 12:19:10 +01:00
parent c03fd14bcd
commit 983c51ea08

View File

@ -1,7 +1,7 @@
from ollama import ChatResponse, chat
def ollama_chat_automatic_function_calling(
def ollama_automatic_function_calling(
client_fn: chat,
messages: list[dict],
options: dict = None,
@ -163,7 +163,7 @@ def div(a: float, b: float) -> float:
if __name__ == "__main__":
from ollama import chat
response, messages = ollama_chat_automatic_function_calling(
response, messages = ollama_automatic_function_calling(
chat,
model="glm-5:cloud",
tools=[add, sub, mul, div],