mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-07-24 05:16:09 +00:00
fix: user_funcs typo in ollama chat requester (#1431)
This commit is contained in:
committed by
GitHub
parent
bb930aec14
commit
1992934dce
@@ -42,7 +42,7 @@ class OllamaChatCompletions(requester.LLMAPIRequester):
|
|||||||
query: core_entities.Query,
|
query: core_entities.Query,
|
||||||
req_messages: list[dict],
|
req_messages: list[dict],
|
||||||
use_model: requester.RuntimeLLMModel,
|
use_model: requester.RuntimeLLMModel,
|
||||||
user_funcs: list[tools_entities.LLMFunction] = None,
|
use_funcs: list[tools_entities.LLMFunction] = None,
|
||||||
extra_args: dict[str, typing.Any] = {},
|
extra_args: dict[str, typing.Any] = {},
|
||||||
) -> llm_entities.Message:
|
) -> llm_entities.Message:
|
||||||
args = extra_args.copy()
|
args = extra_args.copy()
|
||||||
@@ -67,8 +67,8 @@ class OllamaChatCompletions(requester.LLMAPIRequester):
|
|||||||
args['messages'] = messages
|
args['messages'] = messages
|
||||||
|
|
||||||
args['tools'] = []
|
args['tools'] = []
|
||||||
if user_funcs:
|
if use_funcs:
|
||||||
tools = await self.ap.tool_mgr.generate_tools_for_openai(user_funcs)
|
tools = await self.ap.tool_mgr.generate_tools_for_openai(use_funcs)
|
||||||
if tools:
|
if tools:
|
||||||
args['tools'] = tools
|
args['tools'] = tools
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user