Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
RockChinQ authored Sep 22, 2023
1 parent 75a4b85 commit ecafb07
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,12 @@ then you can open the admin page at `http://localhost:3000/`.

## Usage

Create channel on the admin page, create a new key.
Set the url (e.g. http://localhost:3000/v1 ) as OpenAI endpoint, and set the generated key as OpenAI api key.
Then you can use the OpenAI API to access the reverse engineered LLM lib.
1. Create channel on the admin page, create a new key.

<img width="752" alt="image" src="https://github.com/RockChinQ/free-one-api/assets/45992437/d163652b-0b71-4ca9-89fb-ac964692f0ee">

2. Set the url (e.g. http://localhost:3000/v1 ) as OpenAI endpoint, and set the generated key as OpenAI api key.
3. Then you can use the OpenAI API to access the reverse engineered LLM lib.

```curl
# curl example
Expand All @@ -73,6 +76,7 @@ curl http://localhost:3000/v1/chat/completions \
```

```python
# python example
import openai

openai.api_base = "http://localhost:3000/v1"
Expand Down

0 comments on commit ecafb07

Please sign in to comment.