Skip to content

DO NOT MERGE! Only intended for showing changes since 2025/01/16 generated code! #1

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

Closed
wants to merge 9 commits into from

Conversation

paulpv
Copy link
Contributor

@paulpv paulpv commented Jan 18, 2025

No description provided.

Several problems with the generated code:
* Realtime spec (https://platform.openai.com/docs/api-reference/realtime) allows some null fields to have special meaning; Moshi defaults to not sending null fields; add SerializeNull to allow some fields to be sent null.
* Session `max_response_output_tokens` (https://platform.openai.com/docs/api-reference/realtime-sessions/create#realtime-sessions-create-max_response_output_tokens) can be either a number (1.4096) or `"inf"`; Make `RealtimeSessionMaxResponseOutputTokens` support both.
* Server is sending several undocumented values; add `in_progress`, `audio`
* Server is sending null `previous_item_id`; make `previous_item_id` nullable
* Removing unnecessary imports instead of renaming any
The purpose of this is to support writing a `RealtimeClient` class in a separate module.
I do not want that code to have to rewrite request/response serialization.
Conversely, I would like for the code to reuse as much of this module as useful.
That code will be serializing RealtimeClientEvent* requests a lot.
I see no reason why ApiClient.request **has** to be protected.

The problem is that ApiClient.request is inline reified, and it seems that all inline
reified methods need to have all methods they call have the same visibility. :/
It is definitely not ideal that I am making so many protected things public, but
the methods I am making public seem harmless enough to do coding a more
drastic refactor.
@paulpv paulpv changed the title DO NOT MERGE! Only intended for showing changes since 2!025/01/16 generated code! DO NOT MERGE! Only intended for showing changes since 2025/01/16 generated code! Jan 18, 2025
@paulpv paulpv deleted the branch generated/20250116 February 14, 2025 21:09
@paulpv paulpv closed this Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant