Translator

Methods

translate

async (input, options) => string

See translateStreaming

translateStreaming

(input, options) => ReadableStream

This prompts the language model to translate the provided text. The returned stream should contain the translation

Input

A string to be translated

Options (optional)

signal optional AbortSignal

Returns a readable stream that updates each time new tokens are available from the language model

Last updated