Skip to content

Usage.fromMap fails on completions property #5

@tomtaila

Description

@tomtaila

I get the following when requesting some completions:

error: type 'Null' is not a subtype of type 'int' in type cast, stacktrace: #0 new Usage.fromMap (package:openai_client/src/model/shared_models/usage.dart:17:53)

I imagine it happens when no results are generated by openAI

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