42 lines
1.1 KiB
Python
42 lines
1.1 KiB
Python
class DifyAdapter:
|
|
def run_structured_task(self, payload: dict) -> dict:
|
|
return {
|
|
"status": "stub",
|
|
"provider": "dify",
|
|
"payload": payload,
|
|
}
|
|
|
|
def stream_chat(self, payload: dict):
|
|
yield {
|
|
"status": "stub",
|
|
"provider": "dify",
|
|
"payload": payload,
|
|
}
|
|
|
|
def create_knowledge_base(self, payload: dict) -> dict:
|
|
return {
|
|
"status": "stub",
|
|
"provider": "dify",
|
|
"payload": payload,
|
|
}
|
|
|
|
def upload_knowledge_document(self, payload: dict) -> dict:
|
|
return {
|
|
"status": "stub",
|
|
"provider": "dify",
|
|
"payload": payload,
|
|
}
|
|
|
|
def get_knowledge_document_status(self, payload: dict) -> dict:
|
|
return {
|
|
"status": "stub",
|
|
"provider": "dify",
|
|
"payload": payload,
|
|
}
|
|
|
|
def run_contract_review(self, payload: dict) -> dict:
|
|
return self.run_structured_task(payload)
|
|
|
|
def stream_legal_answer(self, payload: dict):
|
|
return self.stream_chat(payload)
|