mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-07-18 19:02:30 +00:00
chore: cleanups from review feedback on openai api docs
This moves the Models section to the top of the supported APIs, along with a brief explanation so that it's not just a bare section with just a small code sample. This also adjusts the MyST directives to use code fences instead of markdown directives, as that allows word wrapping to work as normal instead of it rendering as a single long line in the GitHub UI and such. The actual rendered HTML content is identical, but this makes it a bit easier to review. And, the warning from the Responses API structured output section is removed because we've now merged support for that. Signed-off-by: Ben Browning <bbrownin@redhat.com>
This commit is contained in:
parent
390ace8748
commit
c4c67ac775
1 changed files with 13 additions and 13 deletions
|
@ -32,11 +32,19 @@ Regardless of the client you choose, the following code examples should all work
|
|||
|
||||
## APIs implemented
|
||||
|
||||
### Models
|
||||
|
||||
Many of the APIs require you to pass in a model parameter. To see the list of models available in your Llama Stack server:
|
||||
|
||||
```python
|
||||
models = client.models.list()
|
||||
```
|
||||
|
||||
### Responses
|
||||
|
||||
```{note}
|
||||
:::{note}
|
||||
The Responses API implementation is still in active development. While it is quite usable, there are still unimplemented parts of the API. We'd love feedback on any use-cases you try that do not work to help prioritize the pieces left to implement. Please open issues in the [meta-llama/llama-stack](https://github.com/meta-llama/llama-stack) GitHub repository with details of anything that does not work.
|
||||
```
|
||||
:::
|
||||
|
||||
#### Simple inference
|
||||
|
||||
|
@ -60,10 +68,6 @@ Code's gentle silence
|
|||
|
||||
#### Structured Output
|
||||
|
||||
```{warning}
|
||||
Structured outputs are not yet implemented for the Responses API as of Llama Stack 0.2.8. Below is an example of how this should work, once it is implemented.
|
||||
```
|
||||
|
||||
Request:
|
||||
|
||||
```python
|
||||
|
@ -98,7 +102,9 @@ print(response.output_text)
|
|||
|
||||
Example output:
|
||||
|
||||
Omitted - see warning above.
|
||||
```text
|
||||
{ "participants": ["Alice", "Bob"] }
|
||||
```
|
||||
|
||||
### Chat Completions
|
||||
|
||||
|
@ -185,9 +191,3 @@ Lines of code unfurl
|
|||
Logic whispers in the dark
|
||||
Art in hidden form
|
||||
```
|
||||
|
||||
### Models
|
||||
|
||||
```python
|
||||
models = client.models.list()
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue