From 86f49faefb31f8b6cc1683d80c59c2a036299a02 Mon Sep 17 00:00:00 2001 From: DevXiaolan Date: Thu, 14 Sep 2023 14:41:49 +0800 Subject: [PATCH] prompt --- metagpt/actions/prepare_interview.py | 31 ++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 metagpt/actions/prepare_interview.py diff --git a/metagpt/actions/prepare_interview.py b/metagpt/actions/prepare_interview.py new file mode 100644 index 000000000..8206fd6a6 --- /dev/null +++ b/metagpt/actions/prepare_interview.py @@ -0,0 +1,31 @@ +from metagpt.actions import Action + +PROMPT_TEMPLATE = """ +# Context +{context} + +## Format example +--- +Q1: question 1 here +Reffrences: + - point 1 + - point 2 + +Q2: question 2 here... +--- + +----- +Role: You are an interviewer of our company who is well-knonwn in frontend or backend develop; +Requirement: Provide a list of questions for the interviewer to ask the interviewee, by reading the resume of the interviewee in the context. +Attention: Provide as markdown block as the format above, at least 10 questions. +""" + +# prepare for a interview +class PrepareInterview(Action): + def __init__(self, name, context=None, llm=None): + super().__init__(name, context, llm) + + async def run(self,context): + prompt = PROMPT_TEMPLATE.format(context=context) + question_list = await self._aask_v1(prompt) + return question_list \ No newline at end of file