Skip to content

Commit

Permalink
fix: Update docs now that we no longer return a list from OpenAI-comp…
Browse files Browse the repository at this point in the history
…atible endpoints (#281)
  • Loading branch information
jeffreyftang authored Feb 26, 2024
1 parent 740fa0b commit 54007ac
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ resp = client.chat.completions.create(
],
max_tokens=100,
)
print("Response:", resp[0].choices[0].message.content)
print("Response:", resp.choices[0].message.content)
```

See [OpenAI Compatible API](https://predibase.github.io/lorax/reference/openai_api) for details.
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/structured_output.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ resp = client.chat.completions.create(
},
)

my_character = json.loads(resp[0].choices[0].message.content)
my_character = json.loads(resp.choices[0].message.content)
print(my_character)
```

Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ resp = client.chat.completions.create(
],
max_tokens=100,
)
print("Response:", resp[0].choices[0].message.content)
print("Response:", resp.choices[0].message.content)
```

See [OpenAI Compatible API](./reference/openai_api.md) for details.
Expand Down

0 comments on commit 54007ac

Please sign in to comment.