Skip to content

LM: todo!() panics on AssistantContent::Image #75

@darinkishore

Description

@darinkishore

Problem

lm/mod.rs has two todo!() panics for AssistantContent::Image:

  • Line 393 (inside execute_tool_loop)
  • Line 501 (inside call)

If a model returns an image response, this panics at runtime instead of returning a proper error.

Fix

Replace with:

AssistantContent::Image(_) => {
    return Err(anyhow::anyhow!("Image responses are not yet supported"));
}

Or, if image support is planned, return a structured PredictError variant.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions