Skip to content

Latest commit

 

History

History
41 lines (22 loc) · 820 Bytes

File metadata and controls

41 lines (22 loc) · 820 Bytes

配置 Cloudflare AI Worker

目录

配置Worker

  1. 在Cloudflare官网上创建一个Worker

  2. 填写.js文件内容

配置域名

  1. 点击触发器

  2. 点击自定义域

使用命令

使用命令

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生成

返回目录