• Stars
    star
    193
  • Rank 201,081 (Top 4 %)
  • Language
    Python
  • Created over 1 year ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

claude in slack api

claude-in-slack-api

通过 Slack API 来使用 Claude

.env.template 重命名为 .env 并填入 Slack APP Token 和 Claude Bot ID

运行

pip install -r requirements.txt
pip install sse-starlette
python claude.py

调用接口文档地址:http://127.0.0.1:8088/docs

对话

curl -X 'POST' \
  'http://127.0.0.1:8088/claude/chat' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "prompt": "你好啊"
}'

清除上下文

curl -X 'POST' \
  'http://127.0.0.1:8088/claude/reset' \
  -H 'accept: application/json' \
  -d ''

公众号文章

Claude|媲美ChatGPT,如何免费接入到个人服务