Skip to content

claude-3

claude-3 媒体宣传媲美 gpt-4

在线测试

注意

1.访问 https://claude-3.ddaiai.com (如果被墙了,换下二级域名前缀 suibian)
2.如果发现被墙了 可以自己换地址 https://suibian.ddaiai.comsuibian 换其他的 如 https://2024.ddaiai.com 都能访问

设置

然后在下图相应的地方设置 OpenAi接口地址:https://api.openai-hk.com OpenAi API KEY: hk-你的apiKey

cover

效果

  • 将模型设置为 claude-3-opus-20240229
  • 输入框 提问对话 cover

程序接入

已经跟openai接口对齐,仅需将模型修改下就好

shell
curl --request POST \
  --url https://api.openai-hk.com/v1/chat/completions \
  --header 'Authorization: Bearer hk-你的key' \
  --header 'content-type: application/json' \
  --data '{
    "max_tokens": 800,
    "model": "claude-3-sonnet-20240229",
    "temperature": 0.8,
    "top_p": 1,
    "presence_penalty": 1,
    "stream":false,
    "messages": [
        {
            "role": "system",
            "content": "You are Claude, a large language model trained by Anthropic. Answer as concisely as possible."
        },
        {
            "role": "user",
            "content": "你是谁请介绍下,你有哪些功能?"
        }
    ]
}'
curl --request POST \
  --url https://api.openai-hk.com/v1/chat/completions \
  --header 'Authorization: Bearer hk-你的key' \
  --header 'content-type: application/json' \
  --data '{
    "max_tokens": 800,
    "model": "claude-3-sonnet-20240229",
    "temperature": 0.8,
    "top_p": 1,
    "presence_penalty": 1,
    "stream":false,
    "messages": [
        {
            "role": "system",
            "content": "You are Claude, a large language model trained by Anthropic. Answer as concisely as possible."
        },
        {
            "role": "user",
            "content": "你是谁请介绍下,你有哪些功能?"
        }
    ]
}'