Skip to content

Commit

Permalink
📝 [Doc] Prettify some formats
Browse files Browse the repository at this point in the history
  • Loading branch information
Hansimov committed Jan 21, 2024
1 parent 4484779 commit 845f414
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ app_port: 22222

Chat with Bing like what you do with OpenAI API.

Project link: https://github.com/Hansimov/bing-chat-api

## Thanks
- [EdgeGPT](https://github.com/acheong08/EdgeGPT) by [@acheong08](https://github.com/acheong08)
- [bingo](https://github.com/weaigc/bingo) by [@weaigc](https://github.com/weaigc)
- [@ninomae](https://github.com/NINOMAE1995)
- [@Harry-zklcdc][https://github.com/Harry-zklcdc]
- [@Harry-zklcdc](https://github.com/Harry-zklcdc)

## Features

Expand All @@ -36,7 +38,9 @@ Chat with Bing like what you do with OpenAI API.
- Support Docker deployment

🔨 In progress:

- [ ] Enhance performance and reduce session create requests

- [ ] Authentication with API key


Expand All @@ -46,8 +50,12 @@ Chat with Bing like what you do with OpenAI API.

After running the API service, you should be able to see the following UI and server logs.

UI of visiting `http://127.0.0.1:22222`:

![](docs/bing-chat-api-ui.png)

Server logs of calling `/chat/completions`:

![](docs/bing-chat-api-server.png)

### Run in Command Line
Expand Down Expand Up @@ -92,7 +100,7 @@ sudo docker run -p 22222:22222 --env http_proxy="http://<server>:<port>" bing-ch

### Using `openai-python`

See: [examples/chat_with_openai.py](https://github.com/Hansimov/bing-chat-api/blob/main/examples/chat_with_openai.py)
See: [`examples/chat_with_openai.py`](https://github.com/Hansimov/bing-chat-api/blob/main/examples/chat_with_openai.py)

```py
from openai import OpenAI
Expand Down Expand Up @@ -123,7 +131,7 @@ for chunk in response:

### Using post requests

See: [examples/chat_with_post.py](https://github.com/Hansimov/bing-chat-api/blob/main/examples/chat_with_post.py)
See: [`examples/chat_with_post.py`](https://github.com/Hansimov/bing-chat-api/blob/main/examples/chat_with_post.py)

```py
import ast
Expand Down

0 comments on commit 845f414

Please sign in to comment.