wip: 2026-08-11 工作树快照(docs/memory/h5.py/scripts 等 447 项未评审改动,安全提交到 feat 分支)

This commit is contained in:
Simon
2026-08-11 09:59:44 +08:00
parent 6be361fb63
commit f2fd4fa012
447 changed files with 273482 additions and 1386 deletions
+27
View File
@@ -0,0 +1,27 @@
#!/usr/bin/env python3
"""测试 Dify API 连接"""
import httpx
import asyncio
import sys
async def test_dify():
url = "http://yw-dify.dc.servyou-it.com/v1/chat-messages"
headers = {"Authorization": "Bearer app-7jkRkAzvX4QM9v9SM3P8mMEO"}
payload = {
"query": "test",
"user": "test_user",
"response_mode": "blocking"
}
try:
async with httpx.AsyncClient(timeout=15) as client:
print(f"Testing Dify API: {url}")
response = await client.post(url, json=payload, headers=headers)
print(f"Status: {response.status_code}")
print(f"Response: {response.text[:500]}")
except Exception as e:
print(f"Error: {e}")
sys.exit(1)
if __name__ == "__main__":
asyncio.run(test_dify())