chore: correct conversational API request methods with latest cortex update #4568
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.
Describe Your Changes
This PR aims to update the cortex latest version to rectify the API convention issue of using the POST method instead of the PATCH method for update endpoints.
There are two conversational endpoints that scoped in the fix:
Modify a thread
jan/extensions/conversational-extension/src/index.ts
Line 66 in 54e04c8
Modify a message
jan/extensions/conversational-extension/src/index.ts
Line 105 in 54e04c8
Fixes Issues
Changes
This pull request includes changes to the
CortexConversationalExtension
class in theextensions/conversational-extension/src/index.ts
file. The changes update the HTTP method used for modifying threads and messages fromPOST
toPATCH
.Key changes:
modifyThread
method to use thePATCH
HTTP method instead ofPOST
when sending updates to the thread endpoint.modifyMessage
method to use thePATCH
HTTP method instead ofPOST
when sending updates to the message endpoint.