Skip to content

Confusing error message #117

Closed
Closed
@ducminh-phan

Description

@ducminh-phan

In the function openai.embeddings_utils.get_embeddings (code), there is a check for the length of the input texts list:

assert len(list_of_text) < 2048, "The batch size should not be larger than 2048."

From the error message The batch size should not be larger than 2048, I expect that this function accepts a list of length 2048. However, the assertion assert len(list_of_text) < 2048 allows a maximum length of 2047. I find this quite confusing.

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