Giter VIP home page Giter VIP logo

poe_2_openai's Introduction

POE API to OpenAI API

简体中文说明

This is a project that converts the official poe.com API to the OpenAI API. It only supports the /v1/chat/completions endpoint.

Usage

Running Locally

  1. Clone the code to your local machine
git clone https://github.com/qingyanbaby/poe_2_openai.git
cd poe_2_openai
  1. Obtain the POE API KEY
# Please go to https://poe.com/api_key to get your API KEY
# Then fill in the API KEY in the .env file
# CUSTOM_TOKEN=your_custom_token is used for accessing the API
# SYSTEM_TOKEN=your_poe_api_key is used for accessing the official POE API

cp .env.example .env
  1. Install dependencies
pip install -r requirements.txt
  1. Run the application
python run.py

Running with Docker Compose

  1. Clone the code to your local machine
git clone https://github.com/qingyanbaby/poe_2_openai.git
cd poe_2_openai
  1. Obtain the POE API KEY
# Please go to https://poe.com/api_key to get your API KEY 
# Then fill in the API KEY in the docker-compose.yml file
# CUSTOM_TOKEN=your_custom_token is used for accessing the API
# SYSTEM_TOKEN=your_poe_api_key is used for accessing the official POE API
  1. Run the application
docker compose up -d

Access URL

# http://localhost:39527/v1/chat/completions

Model Conversion Explanation

model_mapping = {
    "gpt-3.5-turbo-16k": "ChatGPT-16k",
    "gpt-3.5-turbo": "ChatGPT",  
    "gpt-4": "GPT-4",
    "gpt-4-turbo": "Claude-3-Opus",
    "gpt-4-vision-preview": "GPT-4-128k",
    "gpt-4-turbo-preview": "Claude-3-Opus-200k"
}

poe_2_openai's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.