Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/docs/providers/openai.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ sidebar_position: 1

### Server path

Llama Stack exposes an OpenAI-compatible API endpoint at `/v1/openai/v1`. So, for a Llama Stack server running locally on port `8321`, the full url to the OpenAI-compatible API endpoint is `http://localhost:8321/v1/openai/v1`.
Llama Stack exposes OpenAI-compatible API endpoints at `/v1`. So, for a Llama Stack server running locally on port `8321`, the full url to the OpenAI-compatible API endpoint is `http://localhost:8321/v1`.

### Clients

Expand All @@ -25,12 +25,12 @@ client = LlamaStackClient(base_url="http://localhost:8321")

#### OpenAI Client

When using an OpenAI client, set the `base_url` to the `/v1/openai/v1` path on your Llama Stack server.
When using an OpenAI client, set the `base_url` to the `/v1` path on your Llama Stack server.

```python
from openai import OpenAI

client = OpenAI(base_url="http://localhost:8321/v1/openai/v1", api_key="none")
client = OpenAI(base_url="http://localhost:8321/v1", api_key="none")
```

Regardless of the client you choose, the following code examples should all work the same.
Expand Down
Loading
Loading