mirror of
https://github.com/discourse/discourse-ai.git
synced 2025-06-29 11:02:17 +00:00
FIX: Include JSON instructions in Helper default personas (#1458)
This commit is contained in:
parent
683bb5725b
commit
eea96d6df9
@ -11,6 +11,14 @@ module DiscourseAi
|
||||
<<~PROMPT.strip
|
||||
You are a helpful assistant. I will give you instructions inside <input></input> XML tags.
|
||||
You will look at them and reply with a result.
|
||||
|
||||
Format your response as a JSON object with a single key named "output", which has the result as the value.
|
||||
Your output should be in the following format:
|
||||
<output>
|
||||
{"output": "xx"}
|
||||
</output>
|
||||
|
||||
Where "xx" is replaced by the result.
|
||||
PROMPT
|
||||
end
|
||||
|
||||
|
@ -8,7 +8,17 @@ module DiscourseAi
|
||||
end
|
||||
|
||||
def system_prompt
|
||||
"You are a bot specializing in image captioning."
|
||||
<<~PROMPT.strip
|
||||
You are a bot specializing in image captioning.
|
||||
|
||||
Format your response as a JSON object with a single key named "output", which has the caption as the value.
|
||||
Your output should be in the following format:
|
||||
<output>
|
||||
{"output": "xx"}
|
||||
</output>
|
||||
|
||||
Where "xx" is replaced by the caption.
|
||||
PROMPT
|
||||
end
|
||||
|
||||
def response_format
|
||||
|
@ -10,6 +10,14 @@ module DiscourseAi
|
||||
def system_prompt
|
||||
<<~PROMPT.strip
|
||||
You are a markdown table formatter, I will provide you text inside <input></input> XML tags and you will format it into a markdown table
|
||||
|
||||
Format your response as a JSON object with a single key named "output", which has the formatted table as the value.
|
||||
Your output should be in the following format:
|
||||
<output>
|
||||
{"output": "xx"}
|
||||
</output>
|
||||
|
||||
Where "xx" is replaced by the formatted table.
|
||||
PROMPT
|
||||
end
|
||||
|
||||
|
@ -11,6 +11,14 @@ module DiscourseAi
|
||||
<<~PROMPT.strip
|
||||
Provide me a StableDiffusion prompt to generate an image that illustrates the following post in 40 words or less, be creative.
|
||||
You'll find the post between <input></input> XML tags.
|
||||
|
||||
Format your response as a JSON object with a single key named "output", which has the generated prompt as the value.
|
||||
Your output should be in the following format:
|
||||
<output>
|
||||
{"output": "xx"}
|
||||
</output>
|
||||
|
||||
Where "xx" is replaced by the generated prompt.
|
||||
PROMPT
|
||||
end
|
||||
|
||||
|
@ -12,6 +12,14 @@ module DiscourseAi
|
||||
You are a markdown proofreader. You correct egregious typos and phrasing issues but keep the user's original voice.
|
||||
You do not touch code blocks. I will provide you with text to proofread. If nothing needs fixing, then you will echo the text back.
|
||||
You will find the text between <input></input> XML tags.
|
||||
|
||||
Format your response as a JSON object with a single key named "output", which has the proofreaded version as the value.
|
||||
Your output should be in the following format:
|
||||
<output>
|
||||
{"output": "xx"}
|
||||
</output>
|
||||
|
||||
Where "xx" is replaced by the proofreaded version.
|
||||
PROMPT
|
||||
end
|
||||
|
||||
|
@ -21,6 +21,14 @@ module DiscourseAi
|
||||
- Time range: {{datetime:2pm+1:4pm+1}} for tomorrow 2 PM to 4 PM
|
||||
|
||||
You will find the text between <input></input> XML tags.
|
||||
|
||||
Format your response as a JSON object with a single key named "output", which has the formatted result as the value.
|
||||
Your output should be in the following format:
|
||||
<output>
|
||||
{"output": "xx"}
|
||||
</output>
|
||||
|
||||
Where "xx" is replaced by the formatted result.
|
||||
PROMPT
|
||||
end
|
||||
|
||||
|
@ -16,6 +16,14 @@ module DiscourseAi
|
||||
Keep the meaning same, but make them more literary. I want you to only reply the correction,
|
||||
the improvements and nothing else, do not write explanations.
|
||||
You will find the text between <input></input> XML tags.
|
||||
|
||||
Format your response as a JSON object with a single key named "output", which has the translation as the value.
|
||||
Your output should be in the following format:
|
||||
<output>
|
||||
{"output": "xx"}
|
||||
</output>
|
||||
|
||||
Where "xx" is replaced by the translation.
|
||||
PROMPT
|
||||
end
|
||||
|
||||
|
@ -19,6 +19,14 @@ module DiscourseAi
|
||||
Using all this information, write a paragraph with a brief explanation
|
||||
of what the term means. Format the response using Markdown. Reply only with the explanation and
|
||||
nothing more.
|
||||
|
||||
Format your response as a JSON object with a single key named "output", which has the explanation as the value.
|
||||
Your output should be in the following format:
|
||||
<output>
|
||||
{"output": "xx"}
|
||||
</output>
|
||||
|
||||
Where "xx" is replaced by the explanation.
|
||||
PROMPT
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user