Getting the runId from createAndStream

Found it:

...
       .on('event', (params: any) => {
          const { event, data } = params;

          if (event === 'thread.run.created') {
            const { id } = data;
            runId = id;
          }
        })

Here is the entire list of events.

1 Like