ChatGPT Adapter: A Unified Interface Service
Overview
The ChatGPT-Adapter is a versatile project designed to consolidate various free services associated with ChatGPT into one cohesive interface. This adapter provides an integrated API service, allowing users to harness the capabilities of different AI models across multiple operating systems, including MacOS, Windows, and Linux. Additionally, it introduces experimental toolCall features, enabling AI without inherent toolCall capabilities to perform tasks effectively.
Usage
To deploy the adapter, users can execute the following command on their preferred system environment:
./linux-server -h
The basic functionality includes:
- A uniform interface for GPT adapter services.
- Integration with models such as Bing, Claude-2, and Gemini.
Users can start the service with customized settings through:
./linux-server --port 8080 --proxies socks5://127.0.0.1:7890
This flexibility allows adaptation in diverse network scenarios by configuring the proxies appropriately.
Supported Models
The ChatGPT-Adapter features a variety of models, such as Claude, Bing, Coze, and Gemini. Each model is equipped with a unique ID, and further models can be explored via API access. Here’s a glimpse into the model structure:
[
{
"id": "claude",
"object": "model",
"created": 1686935002,
"owned_by": "claude-adapter"
},
{
"id": "bing",
"object": "model",
"created": 1686935002,
"owned_by": "bing-adapter"
},
...
]
Using the Adapter
Users can engage in dialogue through several API endpoints:
/v1/chat/completions
/v1/object/completions
/proxies/v1/chat/completions
A sample request using curl
might look like this:
curl -i -X POST \
-H "Content-Type:application/json" \
-H "Authorization: xxx" \
-d \
'{
"stream": true,
"model": "coze",
"messages": [
{
"role": "user",
"content": "hi"
}
]
}' \
'http://127.0.0.1:8080/v1/chat/completions'
Preview and Customization
The project includes several visual demonstrations showcasing different models like LobeChat, FastGPT, and others. Additionally, the adapter supports advanced configurations:
- Custom Model Integration: Users can create custom AI interfaces to implement toolCall functionalities by adding a
custom/
prefix to the model name. - Free Drawing API: Several free drawing interfaces such as
coze.dall-e-3
,sd.dall-e-3
, and more, allow image generation based on provided prompts.
Authorization Process
Different models require specific authorization protocols:
- Claude: Requires
sessionKey
from browser cookies onclaude.ai
. - Bing: Needs
_U
value from cookies onwww.bing.com
. - Gemini: Involves token retrieval from
ai.google.dev
. - Coze: Deprecated as it has moved to a paid model.
Conclusion
The ChatGPT-Adapter embodies a robust solution for integrating various AI models into a streamlined interface. By supporting a wide range of models and providing flexible configuration options, it addresses the needs of users requiring an expansive AI toolkit. Regular updates and a community-driven approach ensure the tool remains relevant and efficient for diverse applications.