Update app.py
Browse files
app.py
CHANGED
@@ -48,10 +48,12 @@ def getChooseRole(msg):
|
|
48 |
|
49 |
def getChooseClass(msg):
|
50 |
full = getChooseRole(msg)
|
51 |
-
if
|
52 |
-
|
53 |
-
|
54 |
-
|
|
|
|
|
55 |
|
56 |
def chatbot(input, messages):
|
57 |
messages = messages or [{"role": "system", "content": initMsg}]
|
|
|
48 |
|
49 |
def getChooseClass(msg):
|
50 |
full = getChooseRole(msg)
|
51 |
+
if full != "":
|
52 |
+
start_index = full.index(" ") + len(" ")
|
53 |
+
end_index = msg.index(",")
|
54 |
+
return trim(full[start_index:] + full[:end_index])
|
55 |
+
else:
|
56 |
+
return ""
|
57 |
|
58 |
def chatbot(input, messages):
|
59 |
messages = messages or [{"role": "system", "content": initMsg}]
|