How to Retrieve Results from a Run Using Open AI Assistant?

This topic was automatically generated from Slack. You can find the original thread here.

I am using an Open AI assistant and then the Create Run Open AI step. How can I get the results from the run?

To get the results from the “Create Run Open AI” step in your Pipedream workflow, you can access the data returned by that step in subsequent steps using the steps object. Here’s an example of how you might do this in a Node.js code step: export default defineComponent({ async run({ steps, $ }) { // Access the output of the "Create Run Open AI" step const openAIResult = steps.open_ai_run.$return_value; // Do something with the results console.log(openAIResult); // Return the result so it can be used in future steps return openAIResult; }, }); In this example, replace open_ai_run with the actual name of the step that runs the OpenAI operation in your workflow. The $return_value property contains the data returned from the OpenAI step. If you’re using the output directly in the Pipedream UI without a code step, you can reference the output of the OpenAI step in subsequent steps using the variable steps.open_ai_run.$return_value directly in the relevant fields. Remember, the exact step name (open_ai_run in this example) may vary depending on what you named the step in your workflow.

But I want the results from the run. At this point, they are just queued to run.