(
orgInfo: {
name: string;
description: string;
},
userDescription: string | undefined,
)
| 3 | import { getActionDescriptions, getIntroText } from "./chatBot"; |
| 4 | |
| 5 | export function requestCorrectionSystemPrompt( |
| 6 | orgInfo: { |
| 7 | name: string; |
| 8 | description: string; |
| 9 | }, |
| 10 | userDescription: string | undefined, |
| 11 | ): ChatGPTMessage { |
| 12 | return { |
| 13 | role: "system", |
| 14 | content: `${getIntroText(orgInfo)} Your purpose is to assist users ${ |
| 15 | orgInfo.name ? `in ${orgInfo.name} ` : "" |
| 16 | }via function calls |
| 17 | ${ |
| 18 | userDescription |
| 19 | ? `\nThe following is a description of the user: ${userDescription}\n` |
| 20 | : "" |
| 21 | } |
| 22 | The main chatbot AI has made a mistake in a function call. Your role is to output a value for the missing parameter to correct this mistake |
| 23 | |
| 24 | If you are unsure of what to output, output "ask user". Avoid asking the user unless you absolutely have to |
| 25 | |
| 26 | Output only the response or "ask user" |
| 27 | |
| 28 | Today's date is ${new Date().toISOString().split("T")[0]}`, |
| 29 | }; |
| 30 | } |
| 31 | |
| 32 | export default function requestCorrectionPrompt( |
| 33 | missingParam: string, |
no test coverage detected