You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue with Argument Order in submitToolOutputs Invocation
Description
There seems to be a discrepancy in the order of arguments passed to the submitToolOutputs function in the invoke method of experimental/openai_assistant/index.js. Specifically, the order of threadId and runId is reversed in the last case of the invoke method.
Expected Behavior
The submitToolOutputs function should receive arguments in the following order:
threadId
runId
body
Actual Behavior
In the last else block of the invoke method, the submitToolOutputs function is called with runId first, followed by threadId, which is inconsistent with the expected argument order.
Relevant Code Snippet
// ... [other code in the invoke method] ...else{// Submitting tool outputs to an existing run, outside the AgentExecutor// framework.run=awaitthis.client.beta.threads.runs.submitToolOutputs(input.runId,input.threadId,{tool_outputs: input.toolOutputs,});}// ... [rest of the invoke method] ...
Suggested Fix
Swap the positions of input.runId and input.threadId in the problematic call to align with the expected argument order.
The text was updated successfully, but these errors were encountered:
Thank you for bringing this to our attention! Your observation about the argument order in the submitToolOutputs function call is spot on. It's great to see your attention to detail and your willingness to suggest a fix.
If you'd like to contribute the suggested fix, creating a pull request with the proposed changes would be a valuable contribution to the langchainjs framework. Your effort to improve the codebase is much appreciated!
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.
Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.
If you want to continue the conversation, start your reply with @dosu-bot.
dosubotbot
added
the
auto:bug
Related to a bug, vulnerability, unexpected error with an existing feature
label
Dec 14, 2023
Issue with Argument Order in
submitToolOutputs
InvocationDescription
There seems to be a discrepancy in the order of arguments passed to the
submitToolOutputs
function in theinvoke
method ofexperimental/openai_assistant/index.js
. Specifically, the order ofthreadId
andrunId
is reversed in the last case of theinvoke
method.Expected Behavior
The
submitToolOutputs
function should receive arguments in the following order:threadId
runId
body
Actual Behavior
In the last
else
block of theinvoke
method, thesubmitToolOutputs
function is called withrunId
first, followed bythreadId
, which is inconsistent with the expected argument order.Relevant Code Snippet
Suggested Fix
Swap the positions of
input.runId
andinput.threadId
in the problematic call to align with the expected argument order.The text was updated successfully, but these errors were encountered: