-
在Cloudflare官网上创建一个Worker
-
填写
.js
文件内容
-
点击
触发器
-
点击
自定义域
使用命令
curl -X POST https://example.com/ -d '{"prompt":"Write a poem about clouds"}' | jq -r .response
curl -X POST https://xllama2.kingxhj.eu.org/ -d '{"messages": [{ "role": "system", "content": "You are a helpful assistant." }, { "role": "user", "content": "Who won the world series in 2020?" }]}' | jq -r .response
实现交互
index.js
由claude生成