Try a better enhanced prompt prompt

This commit is contained in:
Matt Rubens
2024-12-31 23:52:08 -08:00
parent 64702e94f6
commit 621655aacb
3 changed files with 2 additions and 18 deletions

View File

@@ -74,7 +74,7 @@ describe('enhancePrompt', () => {
await enhancePrompt(mockApiConfig, inputPrompt)
expect(mockHandler.completePrompt).toHaveBeenCalledWith(
'Generate an enhanced version of this prompt (reply with only the enhanced prompt, no other text or bullet points): Test prompt'
'Generate an enhanced version of this prompt (reply with only the enhanced prompt - no conversation, explanations, lead-in, bullet points, placeholders, or surrounding quotes):\n\nTest prompt'
)
})
})

View File

@@ -21,6 +21,6 @@ export async function enhancePrompt(apiConfiguration: ApiConfiguration, promptTe
throw new Error("Expected OpenRouter handler")
}
const prompt = `Generate an enhanced version of this prompt (reply with only the enhanced prompt, no other text or bullet points): ${promptText}`
const prompt = `Generate an enhanced version of this prompt (reply with only the enhanced prompt - no conversation, explanations, lead-in, bullet points, placeholders, or surrounding quotes):\n\n${promptText}`
return handler.completePrompt(prompt)
}