qwen_agent/CLAUDE.md
2025-12-18 09:41:43 +08:00

880 B
Raw Permalink Blame History

python环境

本项目的python环境是基于 poetry创建的如果需要运行 py文件需要执行poetry run python xxx.py 来执行。 启动脚本:

poetry run uvicorn fastapi_app:app --host 0.0.0.0 --port 8001

测试脚本:

curl --request POST \
  --url http://localhost:8001/api/v2/chat/completions \
  --header 'authorization: Bearer a21c99620a8ef61d69563afe05ccce89' \
  --header 'content-type: application/json' \
  --header 'X-Request-ID: 123123123' \
  --data '{
  "messages": [
    {
      "role": "user",
      "content": "咖啡多少钱一杯"
    }
  ],
  "stream": true,
  "model": "whatever",
  "language": "ja",
  "bot_id": "63069654-7750-409d-9a58-a0960d899a20",
  "tool_response": true,
  "session_id":"xxxxx",
  "user_identifier": "及川"
}'

环境变量

环境变量的代码都需要放到 utils/settings.py里管理