Skip to content

Commit

Permalink
fix json respond format
Browse files Browse the repository at this point in the history
  • Loading branch information
joyqi committed Feb 27, 2024
1 parent 26c9a4e commit 19b6bc7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ export async function translate<T extends StructureType, F extends FormatterType
modelName: model,
});

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

if (format === 'auto') {
Expand Down

0 comments on commit 19b6bc7

Please sign in to comment.