增加工具使用功能
This commit is contained in:
@@ -14,6 +14,7 @@ from models import (
|
||||
)
|
||||
from service import ChatProviderError, ChatService
|
||||
from storage import JsonSessionStorage, SessionNotFoundError, SessionStorageError
|
||||
from tools import ToolRegistry
|
||||
|
||||
|
||||
def create_app(
|
||||
@@ -37,6 +38,9 @@ def create_app(
|
||||
storage=storage,
|
||||
client=resolved_client,
|
||||
model=resolved_settings.model,
|
||||
tool_registry=ToolRegistry(resolved_settings.tool_timeout_seconds),
|
||||
max_tool_rounds=resolved_settings.max_tool_rounds,
|
||||
max_tool_calls_per_turn=resolved_settings.max_tool_calls_per_turn,
|
||||
)
|
||||
yield
|
||||
if client is None:
|
||||
|
||||
Reference in New Issue
Block a user