Skip to content

No validation for embedding response in UiPathOpenAIEmbeddings to handle malformed responses #185

@Karanraj-6

Description

@Karanraj-6

chunk_embeddings = [r["embedding"] for r in response["data"]]

What the current behavior is (response["data"] and response["usage"]["prompt_tokens"] are assumed to exist).
-Why this can fail (API changes, network issues, unexpected response).
-What the expected behavior should be (validate or handle missing keys gracefully).

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