Skip to content

A PHP Digital Ocean App Platform based port of jtsang4/claude-to-chatgpt.

License

Notifications You must be signed in to change notification settings

id-2/claude-to-chatgpt-php-digital-ocean

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

claude-to-chatgpt-php-digital-ocean

Star on GitHub Fork on GitHub Watch on GitHub

Version 1.0.8 License: MIT Built with PHP

A PHP Digital Ocean App Platform based port of jtsang4/claude-to-chatgpt's cloudflare-worker.js.

Digital Ocean App Platform calls offer more resources than Cloudflare Workers and may be more performant in some use cases.

This project converts the API of Anthropic's Claude model to the OpenAI Chat API format.

  • ✨ Call Claude API like OpenAI ChatGPT API
  • 💦 Support streaming response
  • 🐻 Support claude-instant-1, claude-2 models

Deploy to Digital Ocean

Click this button to deploy the project to your Digital Ocean account:

Deploy to DO

Digital Ocean App Platform Setup

Commands > Run Command

heroku-php-nginx -C nginx.conf .

Endpoints

Once deployed, two endpoints are available:

  • /v1/models
  • /v1/chat/completions

Testing your claude-to-chatgpt-php-digital-ocean Deployment

curl -X POST http://DO-APP-PLATFORM-SERVER.app/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: MY_CLAUDE_API_KEY" \
-d '{"model": "gpt-3.5-turbo", "messages": [{"role": "user", "content": "Hello, how are you?"}]}'

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A PHP Digital Ocean App Platform based port of jtsang4/claude-to-chatgpt.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%