Updated system message
Browse files
app.py
CHANGED
@@ -29,10 +29,10 @@ def respond(message, history, name, char_class, char_alignment, char_race):
|
|
29 |
{
|
30 |
"role": "system",
|
31 |
"content": (
|
|
|
32 |
f"You are a chatbot that helps users create characters for role-playing games."
|
33 |
f"The user might also provide the following information, please use the context of their inputs in your response: \n Character name: {name}, Character Class: {char_class}, Character Race: {char_race}, Character Alignment: {char_alignment}. If they don't include all the information, try to create a character that best fits the needs of their campaign party."
|
34 |
f"Use the following knowledge to inform your answers:\n\n{context}\n\n"
|
35 |
-
"Keep your answers under 300 words."
|
36 |
)
|
37 |
}
|
38 |
]
|
@@ -87,7 +87,7 @@ with gr.Blocks(theme=theme) as chatbot:
|
|
87 |
)
|
88 |
with gr.Row():
|
89 |
|
90 |
-
with gr.Column(scale=1):
|
91 |
|
92 |
|
93 |
character_name = gr.Textbox(label = "Character Name", placeholder="Type your name here…", info ="optional")
|
@@ -98,8 +98,8 @@ with gr.Blocks(theme=theme) as chatbot:
|
|
98 |
"Half-Elf", "Half-Orc", "Halfling", "Hobgoblin", "Human", "Kenku", "Kobold", "Leonin",
|
99 |
"Lizardfolk", "Minotaur", "Orc", "Owlin", "Satyr", "Shadar-kai", "Shifter", "Tabaxi",
|
100 |
"Tiefling", "Tortle", "Triton", "Warforged", "Yuan-ti"
|
101 |
-
], multiselect=True)
|
102 |
-
character_alignment = gr.Dropdown(["Lawful Good", "Neutral Good", "Chaotic Good", "Lawful Neutral", "True Neutral", "Chaotic Neutral", "Lawful Evil", "Neutral Evil", "Chaotic Evil"], elem_classes="alignment_radio")
|
103 |
|
104 |
|
105 |
with gr.Column(scale=2):
|
|
|
29 |
{
|
30 |
"role": "system",
|
31 |
"content": (
|
32 |
+
"You are Gorf, a druid who knows Wild Shape, but only ever learned how to become a Frog. Your life passion is to help people become who they truly are, by helping the user create the perfect character for their party. You will sound magical and mysterious."
|
33 |
f"You are a chatbot that helps users create characters for role-playing games."
|
34 |
f"The user might also provide the following information, please use the context of their inputs in your response: \n Character name: {name}, Character Class: {char_class}, Character Race: {char_race}, Character Alignment: {char_alignment}. If they don't include all the information, try to create a character that best fits the needs of their campaign party."
|
35 |
f"Use the following knowledge to inform your answers:\n\n{context}\n\n"
|
|
|
36 |
)
|
37 |
}
|
38 |
]
|
|
|
87 |
)
|
88 |
with gr.Row():
|
89 |
|
90 |
+
with gr.Column(scale=1, label="Provide any information you want Gorf to keep in mind"):
|
91 |
|
92 |
|
93 |
character_name = gr.Textbox(label = "Character Name", placeholder="Type your name here…", info ="optional")
|
|
|
98 |
"Half-Elf", "Half-Orc", "Halfling", "Hobgoblin", "Human", "Kenku", "Kobold", "Leonin",
|
99 |
"Lizardfolk", "Minotaur", "Orc", "Owlin", "Satyr", "Shadar-kai", "Shifter", "Tabaxi",
|
100 |
"Tiefling", "Tortle", "Triton", "Warforged", "Yuan-ti"
|
101 |
+
], multiselect=True, label="Character Race", info="You can choose multiple")
|
102 |
+
character_alignment = gr.Dropdown(["Lawful Good", "Neutral Good", "Chaotic Good", "Lawful Neutral", "True Neutral", "Chaotic Neutral", "Lawful Evil", "Neutral Evil", "Chaotic Evil"], label="Character Alignment" elem_classes="alignment_radio")
|
103 |
|
104 |
|
105 |
with gr.Column(scale=2):
|