feat: add stateful responses API

This commit is contained in:
Xin Wang
2026-09-07 00:15:32 +08:00
parent ab409ba9c0
commit 43f2cc445e
22 changed files with 2461 additions and 5 deletions
+6 -1
View File
@@ -54,6 +54,7 @@ class DifyLLMService(LLMService):
*,
client: AsyncClient | None = None,
user_id: str | None = None,
conversation_id: str = "",
):
super().__init__(
settings=LLMSettings(
@@ -75,7 +76,11 @@ class DifyLLMService(LLMService):
api_base=normalize_api_base(cfg.dify_api_url),
)
self._user_id = user_id or f"ai-video-{uuid4().hex}"
self._conversation_id = ""
self._conversation_id = conversation_id
@property
def conversation_id(self) -> str:
return self._conversation_id
async def process_frame(self, frame: Frame, direction: FrameDirection):
await super().process_frame(frame, direction)