How to get the openai total token usage from the same node that's streaming the message?
I'm using the OpenAI Assistant node and have modified the code a bit to do message streaming. In the return node, I've set it to return streamed messages.
I was wondering if there's a way to get the total token usage from each streamed message. And if I can have two return nodes, one to output the streaming messages, and the other for token usage?
2 Replies
AI Support Bot Information
<@128006232941395968> you can react on the relevant answer (message) with a ✅ in this thread when you think it has been solved, by the bot or by a human!
Anyone can react on this message with a ❌ if the GPT bot is unhelpful or hallucinating answers.
Please note: Team members will review and answer the questions on best efforts basis.
AI Response
I couldn't find specific information in the uploaded documents regarding tracking token usage in streamed messages from the OpenAI Assistant node or utilizing two return nodes for different outputs. For detailed guidance, you should refer to BuildShip's documentation or contact BuildShip support directly for assistance.
BuildShip AI Support