Skip to content

Commit

Permalink
add openai section
Browse files Browse the repository at this point in the history
  • Loading branch information
dnth committed Nov 13, 2024
1 parent 9cecab7 commit a36a1a4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
✅ List and search models interactively. \
✅ Launch a Gradio interface to interact with a model. \
✅ Serve model as a REST API endpoint with Ray Serve and FastAPI. \
✅ OpenAI chat completions API compatible. \
✅ Customize and add your own models with minimal code changes.

Tasks supported:
Expand Down Expand Up @@ -298,8 +299,15 @@ response = requests.post(url, headers=headers, json=payload)
print(response.json())
```

### OpenAI chat completions API
x.infer endpoint is also compatible with the OpenAI chat completions API format.

You'll have to install the `openai` package to use this feature.

```bash
pip install openai
```

```python
from openai import OpenAI

Expand Down

0 comments on commit a36a1a4

Please sign in to comment.