Skip to content

batch mismatch when using openai retriever #19

@zsychina

Description

@zsychina

all_embeddings.append(torch.tensor(get_openai_embedding(inputs)))

should be

all_embeddings.append(torch.tensor(get_openai_embedding(inputs[i:(i+batch_size)])))

otherwise will cause assert error in

assert embeddings.shape[0] == len(dialogs), "Lengths of embeddings and dialogs do not match"

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