mirror of
https://github.com/ollama/ollama-python.git
synced 2026-05-01 11:48:17 +08:00
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:
parent
c03fd14bcd
commit
983c51ea08
@ -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],
|
||||
|
||||
Loading…
Reference in New Issue
Block a user