Sanity Library Reference Docs
    Preparing search index...

    Variable useAgentTranslateConst Alpha

    useAgentTranslate: () => (
        options: AgentTranslateOptions,
    ) => Subscribable<unknown> = ...

    Translates documents or fields using Sanity Agent Actions.

    • Configure fromLanguage/toLanguage, optional styleGuide, and protectedPhrases.
    • Can write into a different targetDocument, and/or store language in a field.
    • Optional temperature, async, noWrite, conditionalPaths.

    Returns a stable callback that triggers the action and yields a Subscribable stream.

    Type declaration