Skip to content

Migration Guide(v5) missing usageToken migration part #7072

@albertlast

Description

@albertlast

Description

We show the user the amount of used token,
in v4

const chat = useChat({
  onFinish(message, options) {
    usage = options.usage
  }
})

the new Chat class got changed still onFinish but only provide message and
no options any more,
in the message we see no usage information.
Finde in the v5 doc no hint how to get the data in v5.

AI SDK Version

V4:

  • ai: 4.3.16
  • @ai-sdk/vue: 1.2.12

V5:

  • ai: 5.0.0-beta.7
  • @ai-sdk/vue: 2.0.0-beta.8

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingdocsImprovements or additions to documentationv5

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy