mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-09-03 16:17:16 +00:00
feat: switch tool entities and format
This commit is contained in:
@@ -11,7 +11,7 @@ import ollama
|
||||
|
||||
from .. import errors, requester
|
||||
from ... import entities as llm_entities
|
||||
from ...tools import entities as tools_entities
|
||||
import langbot_plugin.api.entities.builtin.resource.tool as resource_tool
|
||||
from ....core import entities as core_entities
|
||||
|
||||
REQUESTER_NAME: str = 'ollama-chat'
|
||||
@@ -42,7 +42,7 @@ class OllamaChatCompletions(requester.LLMAPIRequester):
|
||||
query: core_entities.Query,
|
||||
req_messages: list[dict],
|
||||
use_model: requester.RuntimeLLMModel,
|
||||
use_funcs: list[tools_entities.LLMFunction] = None,
|
||||
use_funcs: list[resource_tool.LLMTool] = None,
|
||||
extra_args: dict[str, typing.Any] = {},
|
||||
) -> llm_entities.Message:
|
||||
args = extra_args.copy()
|
||||
@@ -108,7 +108,7 @@ class OllamaChatCompletions(requester.LLMAPIRequester):
|
||||
query: core_entities.Query,
|
||||
model: requester.RuntimeLLMModel,
|
||||
messages: typing.List[llm_entities.Message],
|
||||
funcs: typing.List[tools_entities.LLMFunction] = None,
|
||||
funcs: typing.List[resource_tool.LLMTool] = None,
|
||||
extra_args: dict[str, typing.Any] = {},
|
||||
) -> llm_entities.Message:
|
||||
req_messages: list = []
|
||||
|
||||
Reference in New Issue
Block a user