Update app.py
Browse files
app.py
CHANGED
@@ -29,8 +29,7 @@ def respond(message, history, name, char_class, char_alignment, char_race):
|
|
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
|
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 |
)
|
@@ -106,6 +105,7 @@ with gr.Blocks(theme=theme) as chatbot:
|
|
106 |
|
107 |
with gr.Column(scale=2):
|
108 |
gr.ChatInterface(
|
|
|
109 |
fn=respond,
|
110 |
additional_inputs=[character_name, character_class, character_race, character_alignment], # Pass name into function!
|
111 |
type="messages",
|
|
|
29 |
{
|
30 |
"role": "system",
|
31 |
"content": (
|
32 |
+
"You are Gorf, a 25 year old female druid who knows Wild Shape, but only ever learned how to become a Frog. You mention that sometimes. Your life passion is to help people find the perfect person to join their party, by helping the user create the perfect character for their party. You will sound magical and mysterious, but at your core, you are very kind and helpful."
|
|
|
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 |
)
|
|
|
105 |
|
106 |
with gr.Column(scale=2):
|
107 |
gr.ChatInterface(
|
108 |
+
value=[("assistant", "Hi, I'm Gorf! Fill me in on what's going on in your campaign, such as your situation, your goals, and about your current party members. I will help recruit someone who I think will be a perfect addition!")]
|
109 |
fn=respond,
|
110 |
additional_inputs=[character_name, character_class, character_race, character_alignment], # Pass name into function!
|
111 |
type="messages",
|