Skip to content

How to track token usage #513

Answered by lgrammel
pomber asked this question in Help
Jun 15, 2023 · 15 comments · 17 replies
Discussion options

You must be logged in to vote

streamText has a onFinish callback (starting with v3.1.15) that sends usage (among other things)

Replies: 15 comments 17 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
7 replies
@benjick
Comment options

@jensen
Comment options

@benjick
Comment options

@jensen
Comment options

@benjick
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@davit-b
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@pomber
Comment options

Comment options

You must be logged in to vote
3 replies
@gablabelle
Comment options

@jensen
Comment options

@jensen
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
5 replies
@laflechaenelaire
Comment options

@lgrammel
Comment options

@laflechaenelaire
Comment options

@lgrammel
Comment options

@laflechaenelaire
Comment options

Answer selected by lgrammel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
Converted from issue

This discussion was converted from issue #85 on August 24, 2023 18:44.