mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-02 05:59:36 +08:00
25 lines
1000 B
Python
25 lines
1000 B
Python
"""Agentic chat capability."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from deeptutor.agents.chat.agentic_pipeline import CHAT_OPTIONAL_TOOLS, AgenticChatPipeline
|
|
from deeptutor.capabilities.request_contracts import get_capability_request_schema
|
|
from deeptutor.core.capability_protocol import BaseCapability, CapabilityManifest
|
|
from deeptutor.core.context import UnifiedContext
|
|
from deeptutor.core.stream_bus import StreamBus
|
|
|
|
|
|
class ChatCapability(BaseCapability):
|
|
manifest = CapabilityManifest(
|
|
name="chat",
|
|
description="Agentic chat with autonomous tool selection across enabled tools.",
|
|
stages=["thinking", "acting", "observing", "responding"],
|
|
tools_used=CHAT_OPTIONAL_TOOLS,
|
|
cli_aliases=["chat"],
|
|
request_schema=get_capability_request_schema("chat"),
|
|
)
|
|
|
|
async def run(self, context: UnifiedContext, stream: StreamBus) -> None:
|
|
pipeline = AgenticChatPipeline(language=context.language)
|
|
await pipeline.run(context, stream)
|