Skip to content

Commit 19b6bc7

Browse files
committed
fix json respond format
1 parent 26c9a4e commit 19b6bc7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,8 @@ export async function translate<T extends StructureType, F extends FormatterType
132132
modelName: model,
133133
});
134134

135-
const chain = buildChain(chat, 'You are a helpful assistant that translates json formatted data from {input_language} to {output_language}. {prompt}');
135+
const chain = buildChain(chat, `You a data translate api that translates json formatted data from {input_language} to {output_language}.
136+
{prompt} Please respond with your translation directly in JSON format.`);
136137
const enc = getEncModel(model);
137138

138139
if (format === 'auto') {

0 commit comments

Comments
 (0)