Skip to content
This repository was archived by the owner on Dec 11, 2025. It is now read-only.

Language detection errorΒ #123

@marialani

Description

@marialani

When the language is not automatically detected the perspective-api-client will throw the error:
response error unable to detect language

The easiest workaround to this issue would be making sure to add a default option as suggested by the official documentation. I'd propose adding this following code example to the readme
const result = await perspective.analyze({ comment: { text }, languages: ["en"], })

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