Spaces:
Runtime error
Runtime error
refine logging
Browse files
app.py
CHANGED
@@ -25,10 +25,11 @@ def ask(model, system_prompt, pre_prompt, question):
|
|
25 |
'content': f"{question}",
|
26 |
},
|
27 |
]
|
28 |
-
logger.debug(f"<< {model} << {
|
29 |
response = chat(model=model, messages=messages)
|
30 |
-
|
31 |
-
|
|
|
32 |
|
33 |
|
34 |
class Actor:
|
@@ -46,7 +47,7 @@ class Actor:
|
|
46 |
|
47 |
|
48 |
def setup(question):
|
49 |
-
pp1 = pp2 = pp3 = "Ask the other two by always starting your sentence with their role. Never start your sentence with your own name. Share your inner thoughts inside parentheses."
|
50 |
priest = Actor("Priest", available_models[0], "You are the Priest. There are 3 people standing in a circle: the Priest (that's you), the Teacher and the Kid.", pp1)
|
51 |
teacher = Actor("Teacher", available_models[0], "You are the Teacher. There are 3 people standing in a circle: the Priest, the Teacher (that's you) and the Kid.", pp2)
|
52 |
kid = Actor("Kid", available_models[0], "You are the Kid. There are 3 people standing in a circle: the Priest, the Teacher and the Kid (that's you).", pp3)
|
@@ -64,7 +65,7 @@ def setup(question):
|
|
64 |
|
65 |
|
66 |
def main():
|
67 |
-
question = setup("Priest, your task is to figure out their names and where they live. Do not ask directly, they must not realize what information you are after!
|
68 |
|
69 |
role = target(question)
|
70 |
for count, _ in enumerate(range(10)):
|
|
|
25 |
'content': f"{question}",
|
26 |
},
|
27 |
]
|
28 |
+
logger.debug(f"<< {model} << {question}")
|
29 |
response = chat(model=model, messages=messages)
|
30 |
+
answer = response['message']['content']
|
31 |
+
logger.debug(f">> {model} >> {answer}")
|
32 |
+
return answer
|
33 |
|
34 |
|
35 |
class Actor:
|
|
|
47 |
|
48 |
|
49 |
def setup(question):
|
50 |
+
pp1 = pp2 = pp3 = "Ask the other two by always starting your sentence with their role. Never start your sentence with your own name. Share your inner thoughts inside parentheses. SAY ONLY ONE SINGLE SENTENCE!"
|
51 |
priest = Actor("Priest", available_models[0], "You are the Priest. There are 3 people standing in a circle: the Priest (that's you), the Teacher and the Kid.", pp1)
|
52 |
teacher = Actor("Teacher", available_models[0], "You are the Teacher. There are 3 people standing in a circle: the Priest, the Teacher (that's you) and the Kid.", pp2)
|
53 |
kid = Actor("Kid", available_models[0], "You are the Kid. There are 3 people standing in a circle: the Priest, the Teacher and the Kid (that's you).", pp3)
|
|
|
65 |
|
66 |
|
67 |
def main():
|
68 |
+
question = setup("Priest, your task is to figure out their names and where they live. Do not ask directly, they must not realize what information you are after!")
|
69 |
|
70 |
role = target(question)
|
71 |
for count, _ in enumerate(range(10)):
|