80a86f5b1b
* fix: 修复 astrbot.core.star 等包下的 type checking error * refactor: improve type checking and annotations * chore: ruff format
14 lines
365 B
Python
14 lines
365 B
Python
from dataclasses import dataclass
|
|
from .tool import FunctionTool
|
|
from typing import Generic
|
|
from .run_context import TContext
|
|
from .hooks import BaseAgentRunHooks
|
|
|
|
|
|
@dataclass
|
|
class Agent(Generic[TContext]):
|
|
name: str
|
|
instructions: str | None = None
|
|
tools: list[str | FunctionTool] | None = None
|
|
run_hooks: BaseAgentRunHooks[TContext] | None = None
|