mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-27 07:54:19 +00:00
feat: switch tool entities and format
This commit is contained in:
@@ -7,7 +7,7 @@ import traceback
|
||||
|
||||
from .. import loader, events, context, models
|
||||
from ...core import entities as core_entities
|
||||
from ...provider.tools import entities as tools_entities
|
||||
from langbot_plugin.api.entities.builtin.resource import tool as resource_tool
|
||||
from ...utils import funcschema
|
||||
from ...discover import engine as discover_engine
|
||||
|
||||
@@ -101,7 +101,7 @@ class PluginLoader(loader.PluginLoader):
|
||||
async def handler(plugin: context.BasePlugin, query: core_entities.Query, *args, **kwargs):
|
||||
return func(*args, **kwargs)
|
||||
|
||||
llm_function = tools_entities.LLMFunction(
|
||||
llm_function = resource_tool.LLMTool(
|
||||
name=function_name,
|
||||
human_desc='',
|
||||
description=function_schema['description'],
|
||||
@@ -147,7 +147,7 @@ class PluginLoader(loader.PluginLoader):
|
||||
function_schema = funcschema.get_func_schema(func)
|
||||
function_name = self._current_container.plugin_name + '-' + (func.__name__ if name is None else name)
|
||||
|
||||
llm_function = tools_entities.LLMFunction(
|
||||
llm_function = resource_tool.LLMTool(
|
||||
name=function_name,
|
||||
human_desc='',
|
||||
description=function_schema['description'],
|
||||
|
||||
@@ -8,7 +8,7 @@ from ...core import app
|
||||
from .. import context, events
|
||||
from .. import loader
|
||||
from ...utils import funcschema
|
||||
from ...provider.tools import entities as tools_entities
|
||||
import langbot_plugin.api.entities.builtin.resource.tool as resource_tool
|
||||
|
||||
|
||||
class PluginManifestLoader(loader.PluginLoader):
|
||||
@@ -41,7 +41,7 @@ class PluginManifestLoader(loader.PluginLoader):
|
||||
function_schema = funcschema.get_func_schema(func)
|
||||
function_name = self._current_container.plugin_name + '-' + (func.__name__ if name is None else name)
|
||||
|
||||
llm_function = tools_entities.LLMFunction(
|
||||
llm_function = resource_tool.LLMTool(
|
||||
name=function_name,
|
||||
human_desc='',
|
||||
description=function_schema['description'],
|
||||
|
||||
Reference in New Issue
Block a user