fix(server): update prompts (#6664)

fix AFF-921
This commit is contained in:
pengx17
2024-04-22 14:09:53 +00:00
parent 62e277d66c
commit 71a5be5385
2 changed files with 47 additions and 4 deletions

View File

@@ -0,0 +1,13 @@
import { PrismaClient } from '@prisma/client';
import { refreshPrompts } from './utils/prompts';
export class UpdatePrompts1713777617122 {
// do the migration
static async up(db: PrismaClient) {
await refreshPrompts(db);
}
// revert the migration
static async down(_db: PrismaClient) {}
}

View File

@@ -133,8 +133,13 @@ export const prompts: Prompt[] = [
messages: [
{
role: 'assistant',
content:
'Please translate the following content into {{language}} and return it to us, adhering to the original format of the content:\n\n{{content}}',
content: `You are a translation expert, please translate the following content into {{language}}, and only perform the translation action, keeping the translated content in the same format as the original content:
""""
{{content}}
""""`,
params: {
language: [
'English',
@@ -302,8 +307,33 @@ export const prompts: Prompt[] = [
messages: [
{
role: 'assistant',
content:
'Identify action items from the following content and return them as a to-do list in Markdown format:\n\n{{content}}',
content: `Please extract the items that can be used as tasks from the following content, and send them to me in the format provided by the template. The extracted items should cover as much of this content as possible:
""""
{{content}}
""""
If there are no items that can be used as to-do tasks, please reply with the following message:
""""
The current content does not have any items that can be listed as to-dos, please check again.
""""
If there are items in the content that can be used as to-do tasks, please refer to the template below:
""""
[] Todo 1
[] Todo 2
[] Todo 3
""""`,
},
],
},