Skip to content

Would be better to use batch embeddings generator instead of Task.WhenAll(...) #14

@Bohdan1998w

Description

@Bohdan1998w

This code causes reaching requests per minute (RPM) limit.

    Embedding<float>[] contextualEmbeddings = await Task.WhenAll(
        contextualSentences.Select(s => embeddingGenerator.GenerateAsync(s, cancellationToken: cancellationToken)));

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