Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

usage info not shown in streaming #40

Open
sophiamyang opened this issue Jan 16, 2024 · 0 comments
Open

usage info not shown in streaming #40

sophiamyang opened this issue Jan 16, 2024 · 0 comments

Comments

@sophiamyang
Copy link
Contributor

usage info is supposed to show in the last chunk of streaming. But it didn't show.

client = MistralClient(api_key=api_key)

messages = [
    ChatMessage(role="user", content="What is the best French cheese?")
]

# With streaming
stream_response = client.chat_stream(model=model, messages=messages)

for chunk in stream_response:
    print(chunk.usage)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant