llama-stack/docs/resources
Xi Yan 15dcc4ea5e
openapi gen return type fix for streaming/non-streaming (#910)
# What does this PR do?

We need to change

```yaml
/v1/inference/chat-completion:
    post:
      responses:
        '200':
          description: >-
            If stream=False, returns a ChatCompletionResponse with the full completion.
            If stream=True, returns an SSE event stream of ChatCompletionResponseStreamChunk
          content:
            text/event-stream:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ChatCompletionResponse'
                  - $ref: '#/components/schemas/ChatCompletionResponseStreamChunk'
```

into

```yaml
/v1/inference/chat-completion:
    post:
      responses:
        '200':
          description: >-
            If stream=False, returns a ChatCompletionResponse with the full completion.
            If stream=True, returns an SSE event stream of ChatCompletionResponseStreamChunk
          content:
            text/event-stream:
              schema:
                $ref: '#/components/schemas/ChatCompletionResponseStreamChunk'
            application/json:
              schema:
                $ref: '#/components/schemas/ChatCompletionResponse'
```

## Test Plan

**Python**
- tested in SDK sync:
https://github.com/meta-llama/llama-stack-client-python/pull/108

**Node**
- tested w/
https://gist.github.com/yanxi0830/b782f4b91e21dcccdfef8898ce55157e (SDK
udpate follow up)


## Sources

Please link relevant resources if necessary.


## Before submitting

- [ ] This PR fixes a typo or improves the docs (you can dismiss the
other checks if that's the case).
- [ ] Ran pre-commit to handle lint / formatting issues.
- [ ] Read the [contributor
guideline](https://github.com/meta-llama/llama-stack/blob/main/CONTRIBUTING.md),
      Pull Request section?
- [ ] Updated relevant documentation.
- [ ] Wrote necessary unit or integration tests.
2025-01-30 18:03:02 -08:00
..
agentic-system.png moving rfc->docs 2024-09-18 16:54:24 -07:00
list-templates.png move openapi from rfcs->docs 2024-09-18 16:09:17 -07:00
llama-stack-spec.html openapi gen return type fix for streaming/non-streaming (#910) 2025-01-30 18:03:02 -08:00
llama-stack-spec.yaml openapi gen return type fix for streaming/non-streaming (#910) 2025-01-30 18:03:02 -08:00
llama-stack.png add llama-stack.png 2024-09-26 11:17:46 -07:00
model-lifecycle.png moving rfc->docs 2024-09-18 16:54:24 -07:00
prompt-format.png Add files via upload 2024-10-08 15:29:19 -07:00