You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been using the OpenAI Go SDK and specifically running the stream example provided at https://github.com/openai/openai-go/blob/main/examples/chat-completion-accumulating/main.go. However, I've encountered an issue where the token usage is always reported as zero, despite the example running correctly and generating outputs.
Steps to Reproduce:
Clone the OpenAI Go SDK from the main branch.
Navigate to the examples/chat-completion-accumulating directory.
Run the example using go run main.go.
Observe the outputs, specifically the token usage statistics.
Expected Behavior:
The token usage should accurately reflect the number of tokens used during the chat completions.
Actual Behavior:
The token usage is consistently reported as zero.
Output Details:
`
> Begin a very brief introduction of Greece, then incorporate the local weather of a few towns
Could you please look into this? It seems like either the token usage data is not being captured accurately, or there might be an issue with how it's being reported in the example.
Thank you for your assistance!
The text was updated successfully, but these errors were encountered:
Hello OpenAI team,
I've been using the OpenAI Go SDK and specifically running the stream example provided at
https://github.com/openai/openai-go/blob/main/examples/chat-completion-accumulating/main.go
. However, I've encountered an issue where the token usage is always reported as zero, despite the example running correctly and generating outputs.Steps to Reproduce:
examples/chat-completion-accumulating
directory.go run main.go
.Expected Behavior:
The token usage should accurately reflect the number of tokens used during the chat completions.
Actual Behavior:
The token usage is consistently reported as zero.
Output Details:
`
> Begin a very brief introduction of Greece, then incorporate the local weather of a few towns
`
Could you please look into this? It seems like either the token usage data is not being captured accurately, or there might be an issue with how it's being reported in the example.
Thank you for your assistance!
The text was updated successfully, but these errors were encountered: