Run.id ending up as undefined when reaching the internal openAI request

I may be wrong but I’m pretty sure the library is asynchronous and you need to prefix your calls with await .

Also

runId, threadId

should be completely unnecessary. More of an opinion but this can just cause confusion. Should just retrieve the IDs from the objects that are created in your calls and not add an unnecessary operation to separate it

1 Like