Skip to content

Clarify that measureInputUsage takes more than just a string. #126

@bradtriebwasser

Description

@bradtriebwasser

The explainer shows several examples measureInputUsage(promptString), but it might be worth noting that it can also measure multimodal content.

session.measureInputUsage([{
  role: "user",
  content: [
    { type: "audio", value: audioBlob }
  ]
}])

Even just changing promptString to promptMessages might make it more obvious that measureInputUsage works for more than just string prompts without looking at the IDL.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions