General Introduction
notdiamond2api is a Flask-based chat proxy service designed to forward requests to the chat.notdiamond.ai server. The project is available inoriginal authornotdiamond2api supports mapping processing of multiple AI models, including GPT-4, Claude-3.5, Gemini-1.5, etc. It is compatible with the OpenAI API format, and supports the Docker Compose deployment. Users can quickly start and use the service with simple configuration and commands.
Function List
- Supports mapping processing of multiple AI models
- Handling streaming and non-streaming responses
- Compatible with OpenAI API formats
- Support for Docker Compose Deployment
- Automatic login and cookie management
- Token Failure auto refresh
- One-click, hassle-free deployment startup
- Supports multi-account polling
Using Help
Installation process
- downloading
docker-compose.yml
Documentation:wget https://raw.githubusercontent.com/Jiabinone/notdiamond2api/main/docker-compose.yml
or using curl
Command:
curl -O https://raw.githubusercontent.com/Jiabinone/notdiamond2api/main/docker-compose.yml
- Set the Docker environment variables and configure the boot port:
AUTH_EMAIL
: Your login email.AUTH_PASSWORD
: Your login password.PORT
The default is 3000. To change this, add the following command to thedocker-compose.yml
modificationsports
The first item of the mapping settings.AUTH_ENABLED
: Whether or not authentication is enabled.AUTH_TOKEN
: The identity token used.
- Start the service using Docker Compose:
docker-compose up -d && docker-compose logs -f
The service will run on the
http://localhost:3000
The
Usage Functions
- Get a list of available models:
GET /v1/models
Returns a list of supported models.
- Send a chat completion request:
POST /v1/chat/completions
Send a chat request and get a response.
Featured Functions
- multi-account polling: Supports polled usage of multiple accounts to ensure high availability of services.
- Automatic Cookie Management: Automatically handles login and cookie management, reducing the operational burden on users.
- Token Failure Auto Refresh: Automatically refreshes the Token when it expires, ensuring continuity of service.