deerflow-code/offline-backend-20260512/backend/packages/harness/deerflow/config/tool_config.py
2026-09-07 18:24:55 +08:00

22 lines
733 B
Python

from pydantic import BaseModel, ConfigDict, Field
class ToolGroupConfig(BaseModel):
"""Config section for a tool group"""
name: str = Field(..., description="Unique name for the tool group")
model_config = ConfigDict(extra="allow")
class ToolConfig(BaseModel):
"""Config section for a tool"""
name: str = Field(..., description="Unique name for the tool")
group: str = Field(..., description="Group name for the tool")
enabled: bool = Field(default=True, description="Whether the tool is registered with the agent")
use: str = Field(
...,
description="Variable name of the tool provider(e.g. deerflow.sandbox.tools:bash_tool)",
)
model_config = ConfigDict(extra="allow")