tokensTool
  1. 拼车版cocopilot
tokensTool
  • 🦊 了解 TokensTool!
  • 🦄 【基础】教你部署tokensTool
  • ⭐ 【基础】教你如何使用TokensTool
  • 🔥 【基础】tokensTool使用GPT-4(独享)
  • 🚗 【基础】tokensTool使用GPT-4(拼车版)
  • 👍 【进阶】tokensTool结合copilot使用fastGpt知识库
  • ✌ 【进阶】tokensTool如何接入PandoraToV1Api到one-api并自动刷新
  • token接口
    • 查询指定shareToken
      GET
    • 查询指定poolToken
      GET
    • 获取全部access_token
      GET
    • 获取指定access_token
      GET
    • 获取全部share_tokens
      GET
  • copilot接口
    • 转发copilot chat 接口
      POST
    • 查询copilot models
      GET
    • 转发copilot embeddings接口
      POST
  • copilot接口 Copy
    • 转发copilot chat 接口
      POST
    • 转发copilot embeddings接口
      POST
    • 查询copilot models
      GET
  • 拼车版cocopilot
    • 拼车版cocopilot models接口
      GET
    • 拼车版cocopliot chat接口
      POST
    • 拼车版cocopliot embeddings接口
      POST
  1. 拼车版cocopilot

拼车版cocopliot chat接口

POST
http://test-cn.your-api-server.comhttp://127.0.0.1:8081/自定义后缀/cocopilot/v1/chat/completions

请求参数

Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token
示例:
Authorization: Bearer ********************
Body 参数text/plain
示例
示例值:{ "stream":true, "model":"gpt-4", "messages": [{"role": "user", "content": "你好"}] }

示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://127.0.0.1:8081/自定义后缀/cocopilot/v1/chat/completions' \
--header 'Content-Type: text/plain' \
--data-raw '{
    "stream":true,
    "model":"gpt-4",
    "messages": [{"role": "user", "content": "你好"}]
}'

返回响应

🟢200成功
application/json
Body
object {0}
示例
data: {
    "choices": [
        {
            "index": 0,
            "delta": {
                "content": null,
                "role": "assistant"
            }
        }
    ],
    "created": 1703682082,
    "id": "chatcmpl-8aNpCyVK7wPuBdxsIYXiFGrpwEsNm"
}

data: {
    "choices": [
        {
            "index": 0,
            "delta": {
                "content": "你",
                "role": null
            }
        }
    ],
    "created": 1703682082,
    "id": "chatcmpl-8aNpCyVK7wPuBdxsIYXiFGrpwEsNm"
}

data: {
    "choices": [
        {
            "index": 0,
            "delta": {
                "content": "好",
                "role": null
            }
        }
    ],
    "created": 1703682082,
    "id": "chatcmpl-8aNpCyVK7wPuBdxsIYXiFGrpwEsNm"
}

data: {
    "choices": [
        {
            "index": 0,
            "delta": {
                "content": "!",
                "role": null
            }
        }
    ],
    "created": 1703682082,
    "id": "chatcmpl-8aNpCyVK7wPuBdxsIYXiFGrpwEsNm"
}

data: {
    "choices": [
        {
            "index": 0,
            "delta": {
                "content": "有",
                "role": null
            }
        }
    ],
    "created": 1703682082,
    "id": "chatcmpl-8aNpCyVK7wPuBdxsIYXiFGrpwEsNm"
}

data: {
    "choices": [
        {
            "index": 0,
            "delta": {
                "content": "什",
                "role": null
            }
        }
    ],
    "created": 1703682082,
    "id": "chatcmpl-8aNpCyVK7wPuBdxsIYXiFGrpwEsNm"
}

data: {
    "choices": [
        {
            "index": 0,
            "delta": {
                "content": "么",
                "role": null
            }
        }
    ],
    "created": 1703682082,
    "id": "chatcmpl-8aNpCyVK7wPuBdxsIYXiFGrpwEsNm"
}

data: {
    "choices": [
        {
            "index": 0,
            "delta": {
                "content": "我",
                "role": null
            }
        }
    ],
    "created": 1703682082,
    "id": "chatcmpl-8aNpCyVK7wPuBdxsIYXiFGrpwEsNm"
}

data: {
    "choices": [
        {
            "index": 0,
            "delta": {
                "content": "可以",
                "role": null
            }
        }
    ],
    "created": 1703682082,
    "id": "chatcmpl-8aNpCyVK7wPuBdxsIYXiFGrpwEsNm"
}

data: {
    "choices": [
        {
            "index": 0,
            "delta": {
                "content": "帮",
                "role": null
            }
        }
    ],
    "created": 1703682082,
    "id": "chatcmpl-8aNpCyVK7wPuBdxsIYXiFGrpwEsNm"
}

data: {
    "choices": [
        {
            "index": 0,
            "delta": {
                "content": "助",
                "role": null
            }
        }
    ],
    "created": 1703682082,
    "id": "chatcmpl-8aNpCyVK7wPuBdxsIYXiFGrpwEsNm"
}

data: {
    "choices": [
        {
            "index": 0,
            "delta": {
                "content": "你",
                "role": null
            }
        }
    ],
    "created": 1703682082,
    "id": "chatcmpl-8aNpCyVK7wPuBdxsIYXiFGrpwEsNm"
}

data: {
    "choices": [
        {
            "index": 0,
            "delta": {
                "content": "的",
                "role": null
            }
        }
    ],
    "created": 1703682082,
    "id": "chatcmpl-8aNpCyVK7wPuBdxsIYXiFGrpwEsNm"
}

data: {
    "choices": [
        {
            "index": 0,
            "delta": {
                "content": "吗",
                "role": null
            }
        }
    ],
    "created": 1703682082,
    "id": "chatcmpl-8aNpCyVK7wPuBdxsIYXiFGrpwEsNm"
}

data: {
    "choices": [
        {
            "index": 0,
            "delta": {
                "content": "?",
                "role": null
            }
        }
    ],
    "created": 1703682082,
    "id": "chatcmpl-8aNpCyVK7wPuBdxsIYXiFGrpwEsNm"
}

data: {
    "choices": [
        {
            "finish_reason": "stop",
            "index": 0,
            "delta": {
                "content": null,
                "role": null
            }
        }
    ],
    "created": 1703682082,
    "id": "chatcmpl-8aNpCyVK7wPuBdxsIYXiFGrpwEsNm"
}

data: [DONE
]
上一页
拼车版cocopilot models接口
下一页
拼车版cocopliot embeddings接口
Built with