Skip to content

[Bug] image_tokens not reported when using multi modal calls #8651

@delip

Description

@delip

What happened?

Image

Steps to reproduce

image_captioner = dspy.Predict(dspy.Signature("image:dspy.Image -> caption:str", instructions="Generate a caption for an image"))
with dspy.context(track_usage=True):
    response = image_captioner(image=dspy.Image.from_url("https://picsum.photos/id/45/200/300"))
    print(response)
    print(response.get_lm_usage())

DSPy version

3.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions