workspace working

This commit is contained in:
2026-01-12 22:31:11 +08:00
parent 2738a822d1
commit 370fe6368a
149 changed files with 4648 additions and 660 deletions

29
check_docs_after_clear.py Normal file
View File

@@ -0,0 +1,29 @@
import asyncio
import aiohttp
import json
async def get_documents(workspace):
url = "http://localhost:3015/documents"
headers = {
"X-API-Key": "jleu1212",
"X-Workspace": workspace,
"accept": "application/json",
}
async with aiohttp.ClientSession() as session:
async with session.get(url, headers=headers) as resp:
print(f"Documents status: {resp.status}")
if resp.status == 200:
result = await resp.json()
print(json.dumps(result, indent=2))
else:
text = await resp.text()
print(f"Error: {text}")
return resp.status
async def main():
workspace = "test1"
print("Checking documents after clear...")
await get_documents(workspace)
if __name__ == "__main__":
asyncio.run(main())