Calculate OpenAI usage for Chat Completion API stream in NodeJS
Oct 1, 2023 · 6 min read · Introduction OpenAI does have the usage field in its non-stream response. For example with a non-stream request like this (stream: false): { "model": "gpt-3.5-turbo", "messages": [ { "role": "user", "content": ...
Join discussion