@collectionscms/plugin-text-generator
Advanced tools
Comparing version 1.2.5 to 1.2.6
{ | ||
"name": "@collectionscms/plugin-text-generator", | ||
"version": "1.2.5", | ||
"version": "1.2.6", | ||
"description": "Text Generation Plugin for Collections.", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -6,2 +6,5 @@ import * as deepl from "deepl-node"; | ||
this.translateParagraphByOpenAI = async (englishName, paragraphs) => { | ||
if (paragraphs.length < 2) { | ||
return []; | ||
} | ||
const orderTexts = paragraphs.map((p) => `- ${p}`).join("\n"); | ||
@@ -8,0 +11,0 @@ const completion = await this.openai.chat.completions.create({ |
15147
330