From 4f9d930500ca2396a598583a1bcaef150ee75044 Mon Sep 17 00:00:00 2001 From: Michal Nicpon Date: Tue, 16 Jul 2024 13:51:22 -0600 Subject: [PATCH] update examples --- fern/docs/pages/reference/translate.mdx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/fern/docs/pages/reference/translate.mdx b/fern/docs/pages/reference/translate.mdx index aab1880..05ff77d 100644 --- a/fern/docs/pages/reference/translate.mdx +++ b/fern/docs/pages/reference/translate.mdx @@ -97,7 +97,7 @@ your preference or requirements, select the appropriate method for your applicat text := "The sky is blue" - resp, err := cln.Translate(ctx, text, client.Languages.English, client.Languages.French, false) + resp, err := cln.Translate(ctx, text, client.Languages.English, client.Languages.French, true) if err != nil { return fmt.Errorf("ERROR: %w", err) } @@ -141,11 +141,12 @@ your preference or requirements, select the appropriate method for your applicat const client = new pg.Client('https://api.predictionguard.com', process.env.PGKEY); async function Translate() { + const text = `The sky is blue`; const sourceLang = pg.Languages.English; const targetLang = pg.Languages.French; - const text = `The sky is blue`; + const useThirdPartyEngine = true; - var [result, err] = await client.Translate(text, sourceLang, targetLang); + var [result, err] = await client.Translate(text, sourceLang, targetLang, useThirdPartyEngine); if (err != null) { console.log('ERROR:' + err.error); return;