接入说明
OpenAI Next-逆解资源-接入指南
一、系统接入方式
(一)通用介绍
方式 | 备注 |
---|---|
在模型名称前加 net- | 例如 gpt-4 开启联网就是 net-gpt-4 |
添加参数 search:true | true:开启联网;false:关闭联网 |
(二)各语言接入示例(以接入 gpt-3.5-turbo 为例)
非流接入
Python
JavaScript
Java
Go
PHP
Curl
Rust
流式接入
Python
JavaScript
Java
Go
Curl
Rust
(三)文件上传功能
请求代码示例:
Ant Design
Python
JavaScript
TypeScript
Go
Rust
PHP
Java
返回参数示例
{
"code": 0,
"msg": "ok",
"sn": "EXAMPLE_SN",
"data": {
"url": "http://EXAMPLE_URL",
"filename": "EXAMPLE_FILENAME.txt",
"image": false
}
}
三、Midjourney 等图像模型使用说明
1.
2.
系统内的参数以及返回数据格式与 OpenAI 完全一样,接入时的接口格式参照 OpenAI__大模型官方技术文档(OpenAI Completions)__,但 base_url 使用我方地址,对应配置好 API Key 和模型名称即可
不同的工程环境需要填写不同的 base_url,可尝试我方如下地址:
3.
四、GPTs 使用说明:
,简而言之就是 OpenAI 开发的插件商店,编辑权限对个人开放,商店内含由官方或非官方上传的,针对各种场景专门使用的模型插件,功能包括论文搜索、翻译、代码补全等等。
(一)总体介绍:
确认模型 ID
功能接入
动态 model | 和普通 gpt-3.5-turbo 模型接入方式保持一致,唯一的参数区别就是 model: gpt-4-gizmo-g-xxxxxx |
---|---|
静态 model | model 固定为 gpt-4-gizmo,需要在 body 中指定 gizmo_id,例如 gizmo_id: g-IZb9C11iR |
(二)GPTs 相关功能示例:
根据 ID 查询 GPTs 详情
请求代码示例:
Python
JavaScript
TypeScript
Go
Java
Rust
PHP
Curl
返回参数示例:
{
"code": 0,
"msg": "ok",
"sn": "4e194d7b417f4a42574c9bc1a0b5fd3b",
"data": {
"stat": {
"read": 0,
"favorite": 0,
"use": 0
},
"info": {
"gizmo": {
"id": "g-yJoNW6R47",
"organization_id": "org-y2vPc3LzlycGK9THlA8aLLBE",
"short_url": "g-yJoNW6R47-gpt-4-turbo-assistants-Python-dev",
"author": {
"user_id": "user-DeunrNwckpyqY67EQ7ulo8MV",
"display_name": "Solid Base Consult SIA",
"link_to": null,
"selected_display": "name",
"is_verified": true,
"will_receive_support_emails": null
},
"voice": {
"id": "ember"
},
"workspace_id": null,
"model": null,
"instructions": null,
"settings": null,
"display": {
"name": "GPT-4-Turbo-Assistants Python Dev",
"description": "Focuses on codebase, GitHub repo, and README details",
"welcome_message": "Hello! Ready to explore your codebase, GitHub repo, and README specifics.",
"prompt_starters": [
"What's in the README for setting up the project?",
"How do I run the setup script from the README?",
"Can you show me the script content in the README?",
"Where can I find the README on GitHub?"
],
"profile_picture_url": "https://filesystem.site/cdn/2024-01-08-12-TJFmNlrlsnDBUeUOdS10.png",
"categories": []
},
"share_recipient": "marketplace",
"updated_at": "2023-11-26T21:45:38.344855+00:00",
"last_interacted_at": null,
"tags": [
"public",
"reportable"
],
"version": null,
"live_version": null,
"training_disabled": null,
"allowed_sharing_recipients": null,
"review_info": null,
"appeal_info": null,
"vanity_metrics": {
"num_conversations_str": "96",
"num_pins": 0,
"num_users_interacted_with": 0
}
},
"tools": [
{
"id": "gzm_cnf_lRHrL9TFOQiHLSuDHnnStRza~gzm_tool_Yb5hVoTUmLdRMVMguUGiSY3Z",
"type": "Python",
"settings": null,
"metadata": null
},
{
"id": "gzm_cnf_lRHrL9TFOQiHLSuDHnnStRza~gzm_tool_fbJqcn5XkJlV1obOTztgKLuy",
"type": "browser",
"settings": null,
"metadata": null
},
{
"id": "gzm_cnf_lRHrL9TFOQiHLSuDHnnStRza~gzm_tool_ZRNEbde67jrKEQiFTdJUswVs",
"type": "dalle",
"settings": null,
"metadata": null
}
],
"files": [
{
"id": "gzm_cnf_rpTGOZYXXT0wEZsPwEVEgXve~gzm_file_OhPEOOZWRogiqkPNgmRU7N1M",
"type": "text/plain",
"file_id": "",
"location": ""
},
{
"id": "gzm_cnf_rpTGOZYXXT0wEZsPwEVEgXve~gzm_file_XaFtKqATMRxHGpq3LcjDapF0",
"type": "text/plain",
"file_id": "",
"location": ""
},
{
"id": "gzm_cnf_rpTGOZYXXT0wEZsPwEVEgXve~gzm_file_09z76OdnrTKyYizMIPFjHWug",
"type": "",
"file_id": "",
"location": ""
},
{
"id": "gzm_cnf_rpTGOZYXXT0wEZsPwEVEgXve~gzm_file_dZD7dmn7U3sxCkTgyswRjsUX",
"type": "",
"file_id": "",
"location": ""
},
{
"id": "gzm_cnf_rpTGOZYXXT0wEZsPwEVEgXve~gzm_file_WID7zBhg4jrq6j2MW6jA52h2",
"type": "",
"file_id": "",
"location": ""
},
{
"id": "gzm_cnf_rpTGOZYXXT0wEZsPwEVEgXve~gzm_file_Zp8gmmMKhuScr5Wt8mCdLPQS",
"type": "",
"file_id": "",
"location": ""
},
{
"id": "gzm_cnf_4AJHrSzyY5jQmuvw2PQj182k~gzm_file_tDkcyix5wV9Ho7zXRKz1XS2p",
"type": "",
"file_id": "",
"location": ""
},
{
"id": "gzm_cnf_4AJHrSzyY5jQmuvw2PQj182k~gzm_file_DTFTEN5iR75VYzgAVjSgYjGY",
"type": "",
"file_id": "",
"location": ""
},
{
"id": "gzm_cnf_omdzDjigCMPFNXhl7t6wVYOD~gzm_file_tshgivw1wThxGIRG0FTguuGM",
"type": "application/pdf",
"file_id": "",
"location": ""
},
{
"id": "gzm_cnf_YGlsl6KEXSr5GeArX8djUldq~gzm_file_Hbo44RggdqTCDGuCtW2g73vf",
"type": "",
"file_id": "",
"location": ""
}
],
"product_features": {
"attachments": {
"type": "retrieval",
"accepted_mime_types": [
"text/x-sh",
"text/html",
"text/javascript",
"text/x-tex",
"text/plain",
"application/vnd.openxmlformats-officedocument.presentationml.presentation",
"text/x-csharp",
"application/msword",
"text/x-php",
"text/x-script.Python",
"text/x-ruby",
"text/markdown",
"application/pdf",
"text/x-c",
"application/x-latext",
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"text/x-c++",
"application/json",
"text/x-java",
"text/x-typescript"
],
"image_mime_types": [
"image/png",
"image/jpeg",
"image/webp",
"image/gif"
],
"can_accept_all_mime_types": true
}
}
},
"@timestamp": "2024-01-08T04:14:20.985Z"
}
}
搜索 GPTs
请求代码示例
Python
JavaScript
TypeScript
Go
Java
Rust
PHP
Curl
返回参数示例:
{
"code": 0,
"msg": "ok",
"sn": "6cd073e5c4f5f979d9ca2bdb857e1d0a",
"data": [
{
"id": "g-gac0xLAbv",
"title": "Chinese 智译 - OpenAI聊天",
"link": "https://chat.openai.com/g/g-gac0xLAbv-chinese-zhi-yi",
"description": "无需说明,自动在中文和其他语言间互译,支持翻译代码注释、文言文、文档文件以及图片。No need for explanations, automatically translate between Chinese and other languages, support translation of code comments, classical Chinese, document files, and images.",
"favicon": "https://external-content.duckduckgo.com/ip3/chat.openai.com.ico"
},
{
"id": "g-5lCF5Lf1T",
"title": "翻譯成中文 - OpenAI聊天",
"link": "https://chat.openai.com/g/g-5lCF5Lf1T",
"description": "把任何語言翻譯成繁體中文Translate any language into Traditional Chinese.",
"favicon": "https://external-content.duckduckgo.com/ip3/chat.openai.com.ico"
},
{
"id": "g-IkXqSNDwI",
"title": "中文Chat GPT - OpenAI聊天",
"link": "https://chat.openai.com/g/g-IkXqSNDwI-zhong-wen-chat-gpt",
"description": "ChatGPT 官方中文版本. By Johnetta Kovacek. Sign up to chat. Requires ChatGPT Plus. ChatGPT 官方中文版本.",
"favicon": "https://external-content.duckduckgo.com/ip3/chat.openai.com.ico"
},
{
"id": "g-MW33CkglH",
"title": "好中文写作GPT - OpenAI聊天",
"link": "https://chat.openai.com/g/g-MW33CkglH-hao-zhong-wen-xie-zuo-gpt",
"description": "浅白易明、高雅简洁的中文日更指南",
"favicon": "https://external-content.duckduckgo.com/ip3/chat.openai.com.ico"
},
{
"id": "g-59ry85hTf",
"title": "中文chatGPT - OpenAI聊天",
"link": "https://chat.openai.com/g/g-59ry85hTf-zhong-wen-chatgpt",
"description": "中文准确、友好、专业. By CHENTAO. Sign up to chat. Requires ChatGPT Plus. 中文准确、友好、专业.",
"favicon": "https://external-content.duckduckgo.com/ip3/chat.openai.com.ico"
},
{
"id": "g-uBhKUJJTl",
"title": "科技文章翻译 - OpenAI聊天",
"link": "https://chat.openai.com/g/g-uBhKUJJTl",
"description": "将科技文章、论文翻译成简体中文。直接输入要翻译的内容即可,不需要额外Prompt。",
"favicon": "https://external-content.duckduckgo.com/ip3/chat.openai.com.ico"
},
{
"id": "g-5Dts1M3sf",
"title": "中文GPT4 - OpenAI聊天",
"link": "https://chat.openai.com/g/g-5Dts1M3sf-zhong-wen-gpt4",
"description": "保留gpt4的所有能力,在中文显示方面做得更好",
"favicon": "https://external-content.duckduckgo.com/ip3/chat.openai.com.ico"
},
{
"id": "g-48MTFZf5N",
"title": "RHINO Coding Helper(中文版) - OpenAI聊天",
"link": "https://chat.openai.com/g/g-48MTFZf5N-rhino-coding-helper-zhong-wen-ban",
"description": "RHINO Coding Helper(中文版) 提高你在Github上的开发工作的效率与质量。 若用于非开源项目,请将Github账号AssistantRHINO添加作项目成员。",
"favicon": "https://external-content.duckduckgo.com/ip3/chat.openai.com.ico"
},
{
"id": "g-5y5x1J0ST",
"title": "Prompt_Generator_ZhTW - OpenAI聊天",
"link": "https://chat.openai.com/g/g-5y5x1J0ST-prompt-generator-zhtw",
"description": "將繁體中文自然語言轉換為T2I提詞. By community builder. Sign up to chat. Requires ChatGPT Plus. 將繁體中文自然語言轉換為T2I提詞.",
"favicon": "https://external-content.duckduckgo.com/ip3/chat.openai.com.ico"
},
{
"id": "g-9bck34XF7",
"title": "英譯港式中文 GPT by OMP (英文名詞會保留用英文,比較貼近香港中文風格。)",
"link": "https://chat.openai.com/g/g-9bck34XF7",
"description": "英譯港式中文 GPT by OMP (英文名詞會保留用英文,比較貼近香港中文風格。. ) 以 \"/\" 開頭,即代表翻譯一次。. 如想有更好質素,以 \"//\" 開頭。. 會提供更通順的翻譯。. By sosomarketing.com. Sign up to chat. Requires ChatGPT Plus. 以 \"/\" 開頭,即代表翻譯一次。.",
"favicon": "https://external-content.duckduckgo.com/ip3/chat.openai.com.ico"
}
]
}
修改于 2024-03-22 08:01:03