Fixing issue on how options were being applied to the request. #72
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request to
sdk/js/packages/client/src/client.ts
includes changes to improve the request preparation process and streamline the code. The most important changes include adding a new utility function for converting operation options to request parameters, refactoring the request preparation logic, and simplifying the request handling in theAIChatProtocolClient
class.Improvements to request preparation:
sdk/js/packages/client/src/client.ts
: AddedoperationOptionsToRequestParameters
to the import statement.sdk/js/packages/client/src/client.ts
: Refactored theprepareRequest
method to use the newoperationOptionsToRequestParameters
utility function and simplified the logic for settingcontentType
andbody
properties. [1] [2] [3]Simplification of request handling:
sdk/js/packages/client/src/client.ts
: Removed theoptions
parameter from thepost
method calls insendMessage
andsendMessageAsStream
methods to simplify the request handling. [1] [2]