fix whitespace, edit README.md

This commit is contained in:
jwj7140 2023-06-30 00:03:02 +09:00
parent a4149aa0c8
commit d7435fe320
2 changed files with 17 additions and 1 deletions

View file

@ -190,3 +190,19 @@ Run with bash:
```sh
bash chat.sh
```
### API like OAI
API example using Python Flask: [api_like_OAI.py](api_like_OAI.py)
This example must be used with server.cpp
```sh
python api_like_OAI.py
```
After running the API server, you can use it in Python by setting the API base URL.
```python
openai.api_base = "http://<Your api-server IP>:port"
```
Then you can utilize llama.cpp as an OpenAI's **chat.completion** or **text_completion** API