-
-
Notifications
You must be signed in to change notification settings - Fork 0
feat:Add StreamOptions schema to OpenAICompletionsIn and OpenAIEmbeddingsIn #141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThis pull request introduces new streaming options in the OpenAPI specification by adding a new schema and properties. A Changes
Sequence Diagram(s)sequenceDiagram
participant C as Client
participant API as API Server
C->>API: Send API request with streaming options (include_usage, continuous_usage_stats)
API--)C: Process request and initiate streaming response
API--)C: Return usage data alongside streamed events
Possibly related PRs
Poem
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
src/libs/DeepInfra/openapi.yaml (2)
5294-5298: Addstream_optionsProperty to OpenAICompletionsIn Schema
This hunk adds a new property namedstream_optionsto the OpenAICompletionsIn schema. It uses anallOfreference to the newStreamOptionsschema, which is a clear way to reuse the defined streaming options. Please verify that this addition aligns with both the API design and the documentation so that users know how to leverage streaming behavior with completions.
5416-5420: Includestream_optionsin the Relevant Input Schema (Embeddings)
In this segment, a similarstream_optionsproperty is added—presumably to the input schema for embeddings requests. As with the completions schema, ensure that its inclusion (and the inherited default values from the StreamOptions schema) does not conflict with any downstream processing and that it is clearly documented for API consumers.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (9)
src/libs/DeepInfra/Generated/DeepInfra.DeepInfraClient.OpenaiChatCompletions.g.csis excluded by!**/generated/**src/libs/DeepInfra/Generated/DeepInfra.DeepInfraClient.OpenaiCompletions.g.csis excluded by!**/generated/**src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraClient.OpenaiChatCompletions.g.csis excluded by!**/generated/**src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraClient.OpenaiCompletions.g.csis excluded by!**/generated/**src/libs/DeepInfra/Generated/DeepInfra.Models.OpenAIChatCompletionsIn.g.csis excluded by!**/generated/**src/libs/DeepInfra/Generated/DeepInfra.Models.OpenAICompletionsIn.g.csis excluded by!**/generated/**src/libs/DeepInfra/Generated/DeepInfra.Models.StreamOptions.Json.g.csis excluded by!**/generated/**src/libs/DeepInfra/Generated/DeepInfra.Models.StreamOptions.g.csis excluded by!**/generated/**src/libs/DeepInfra/Generated/JsonSerializerContextTypes.g.csis excluded by!**/generated/**
📒 Files selected for processing (1)
src/libs/DeepInfra/openapi.yaml(3 hunks)
🔇 Additional comments (1)
src/libs/DeepInfra/openapi.yaml (1)
5758-5771: Define New Schema: StreamOptions
A new schema calledStreamOptionsis introduced with two boolean properties:include_usage(defaulting to true) andcontinuous_usage_stats(defaulting to false). The property names, types, and default values appear intuitive and should provide the necessary control over streaming behavior. Please ensure that related API documentation is updated accordingly and that these defaults meet user expectations.
Summary by CodeRabbit