feat: add stateful responses API
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user