Spaces:
Runtime error
Runtime error
:pencil: [Doc] Prettify some formats
Browse files
README.md
CHANGED
@@ -11,11 +11,13 @@ app_port: 22222
|
|
11 |
|
12 |
Chat with Bing like what you do with OpenAI API.
|
13 |
|
|
|
|
|
14 |
## Thanks
|
15 |
- [EdgeGPT](https://github.com/acheong08/EdgeGPT) by [@acheong08](https://github.com/acheong08)
|
16 |
- [bingo](https://github.com/weaigc/bingo) by [@weaigc](https://github.com/weaigc)
|
17 |
- [@ninomae](https://github.com/NINOMAE1995)
|
18 |
-
- [@Harry-zklcdc]
|
19 |
|
20 |
## Features
|
21 |
|
@@ -36,7 +38,9 @@ Chat with Bing like what you do with OpenAI API.
|
|
36 |
- Support Docker deployment
|
37 |
|
38 |
🔨 In progress:
|
|
|
39 |
- [ ] Enhance performance and reduce session create requests
|
|
|
40 |
- [ ] Authentication with API key
|
41 |
|
42 |
|
@@ -46,8 +50,12 @@ Chat with Bing like what you do with OpenAI API.
|
|
46 |
|
47 |
After running the API service, you should be able to see the following UI and server logs.
|
48 |
|
|
|
|
|
49 |
![](docs/bing-chat-api-ui.png)
|
50 |
|
|
|
|
|
51 |
![](docs/bing-chat-api-server.png)
|
52 |
|
53 |
### Run in Command Line
|
@@ -92,7 +100,7 @@ sudo docker run -p 22222:22222 --env http_proxy="http://<server>:<port>" bing-ch
|
|
92 |
|
93 |
### Using `openai-python`
|
94 |
|
95 |
-
See: [examples/chat_with_openai.py](https://github.com/Hansimov/bing-chat-api/blob/main/examples/chat_with_openai.py)
|
96 |
|
97 |
```py
|
98 |
from openai import OpenAI
|
@@ -123,7 +131,7 @@ for chunk in response:
|
|
123 |
|
124 |
### Using post requests
|
125 |
|
126 |
-
See: [examples/chat_with_post.py](https://github.com/Hansimov/bing-chat-api/blob/main/examples/chat_with_post.py)
|
127 |
|
128 |
```py
|
129 |
import ast
|
|
|
11 |
|
12 |
Chat with Bing like what you do with OpenAI API.
|
13 |
|
14 |
+
Project link: https://github.com/Hansimov/bing-chat-api
|
15 |
+
|
16 |
## Thanks
|
17 |
- [EdgeGPT](https://github.com/acheong08/EdgeGPT) by [@acheong08](https://github.com/acheong08)
|
18 |
- [bingo](https://github.com/weaigc/bingo) by [@weaigc](https://github.com/weaigc)
|
19 |
- [@ninomae](https://github.com/NINOMAE1995)
|
20 |
+
- [@Harry-zklcdc](https://github.com/Harry-zklcdc)
|
21 |
|
22 |
## Features
|
23 |
|
|
|
38 |
- Support Docker deployment
|
39 |
|
40 |
🔨 In progress:
|
41 |
+
|
42 |
- [ ] Enhance performance and reduce session create requests
|
43 |
+
|
44 |
- [ ] Authentication with API key
|
45 |
|
46 |
|
|
|
50 |
|
51 |
After running the API service, you should be able to see the following UI and server logs.
|
52 |
|
53 |
+
UI of visiting `http://127.0.0.1:22222`:
|
54 |
+
|
55 |
![](docs/bing-chat-api-ui.png)
|
56 |
|
57 |
+
Server logs of calling `/chat/completions`:
|
58 |
+
|
59 |
![](docs/bing-chat-api-server.png)
|
60 |
|
61 |
### Run in Command Line
|
|
|
100 |
|
101 |
### Using `openai-python`
|
102 |
|
103 |
+
See: [`examples/chat_with_openai.py`](https://github.com/Hansimov/bing-chat-api/blob/main/examples/chat_with_openai.py)
|
104 |
|
105 |
```py
|
106 |
from openai import OpenAI
|
|
|
131 |
|
132 |
### Using post requests
|
133 |
|
134 |
+
See: [`examples/chat_with_post.py`](https://github.com/Hansimov/bing-chat-api/blob/main/examples/chat_with_post.py)
|
135 |
|
136 |
```py
|
137 |
import ast
|