Skip to content
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

Better modularization of request/response logic #1971

Closed
Tracked by #2419
deyaaeldeen opened this issue Aug 14, 2023 · 0 comments
Closed
Tracked by #2419

Better modularization of request/response logic #1971

deyaaeldeen opened this issue Aug 14, 2023 · 0 comments
Assignees
Labels
CodeGen Issues that relate to code generation HRLC in progress Mgmt This issue is related to a management-plane library. p0 priority 0
Milestone

Comments

@deyaaeldeen
Copy link
Member

The modular code generator generates the following function to handle processing the response:

and it mainly checks if the response is unexpected: and create the output object:

The two parts can be refactored into two separate functions. I need the function that just creates the output object to call it to deserialize server-sent events. That will save me from doing it manually, see https://github.com/Azure/azure-sdk-for-js/blob/cbbcc187abee610b7b11c1be7858a3bbee1d6fe2/sdk/openai/openai/src/api/operations.ts#L572 for an example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CodeGen Issues that relate to code generation HRLC in progress Mgmt This issue is related to a management-plane library. p0 priority 0
Projects
None yet
5 participants