feat: 添加对 chat 和 workflow 的支持

This commit is contained in:
Junyan Qin
2024-12-14 17:51:11 +08:00
parent 2ea3ff0b5c
commit dbf9f2398e
18 changed files with 1301 additions and 187 deletions
+17
View File
@@ -0,0 +1,17 @@
from . import client
import asyncio
import os
class TestDifyClient:
async def test_chat_messages(self):
cln = client.DifyClient(api_key=os.getenv("DIFY_API_KEY"))
resp = await cln.chat_messages(inputs={}, query="Who are you?", user_id="test")
print(resp)
if __name__ == "__main__":
asyncio.run(TestDifyClient().test_chat_messages())