mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-18 10:36:22 +08:00
feat: improve copilot plugin (#3459)
This commit is contained in:
@@ -18,12 +18,10 @@ You can only give one reply for each conversation turn.
|
||||
`;
|
||||
|
||||
export const followupQuestionPrompt = `Rules you must follow:
|
||||
- You only respond in JSON format
|
||||
- Read the following conversation between AI and Human and generate at most 3 follow-up messages or questions the Human can ask
|
||||
- Your response MUST be a valid JSON array of strings like this: ["some question", "another question"]
|
||||
- Each message in your response should be concise, no more than 15 words
|
||||
- You MUST reply in the same written language as the conversation
|
||||
- Don't output anything other text
|
||||
Read the following conversation between AI and Human and generate at most 3 follow-up messages or questions the Human can ask
|
||||
Each message in your response should be concise, no more than 15 words
|
||||
You MUST reply in the same written language as the conversation
|
||||
{format_instructions}
|
||||
The conversation is inside triple quotes:
|
||||
\`\`\`
|
||||
Human: {human_conversation}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
import { StructuredOutputParser } from 'langchain/output_parsers';
|
||||
import { z } from 'zod';
|
||||
|
||||
export const followupQuestionParser = StructuredOutputParser.fromZodSchema(
|
||||
z.object({
|
||||
followupQuestions: z.array(z.string()),
|
||||
})
|
||||
);
|
||||
Reference in New Issue
Block a user