feat:Add Java and Kotlin example code snippets to realtime session endpoints#183
feat:Add Java and Kotlin example code snippets to realtime session endpoints#183
Conversation
WalkthroughThe OpenAPI specification file was updated to include Java and Kotlin example code snippets for the realtime sessions and realtime transcription sessions endpoints. These additions demonstrate client instantiation and API usage in those languages. No changes were made to the API schemas or existing examples. Changes
Poem
✨ Finishing Touches🧪 Generate Unit Tests
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:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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.
Actionable comments posted: 0
🧹 Nitpick comments (4)
src/libs/tryAGI.OpenAI/openapi.yaml (4)
5030-5030: Remove unusedSessionCreateParamsimport in the Java example
SessionCreateParamsis imported but never referenced. It clutters the snippet and will trigger an “unused import” warning if someone copies the code verbatim.-import com.openai.models.beta.realtime.sessions.SessionCreateParams;Either delete the import (shown above) or demonstrate a real-world call that requires parameters:
SessionCreateParams params = SessionCreateParams.builder() .modalities(List.of("audio","text")) .instructions("You are a friendly assistant.") .build(); SessionCreateResponse session = client.beta().realtime().sessions().create(params);
5031-5031: Mirror the Java fix in the Kotlin snippetSame issue as above –
SessionCreateParamsisn’t used. Drop the import or show a call that passes params to avoid warnings.-import com.openai.models.beta.realtime.sessions.SessionCreateParamsOptionally:
val params = SessionCreateParams.builder() .modalities(listOf("audio","text")) .instructions("You are a friendly assistant.") .build() val session = client.beta().realtime().sessions().create(params)
5062-5062: Clean up unusedTranscriptionSessionCreateParamsin Java transcription exampleThe import is unused. Remove it or supply a parameterised call.
-import com.openai.models.beta.realtime.transcriptionsessions.TranscriptionSessionCreateParams;
5063-5063: Same cleanup for Kotlin transcription example
TranscriptionSessionCreateParamsis imported but unused. Drop it or pass params as part of the example.-import com.openai.models.beta.realtime.transcriptionsessions.TranscriptionSessionCreateParams
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/libs/tryAGI.OpenAI/openapi.yaml(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Test / Build, test and publish
Summary by CodeRabbit