Update chat.py
Browse files
chat.py
CHANGED
@@ -18,7 +18,7 @@ def langchainConversation(conversation):
|
|
18 |
def segmind_input_parser(input):
|
19 |
toreturn = []
|
20 |
for thisdict in input:
|
21 |
-
if(
|
22 |
toreturn.append({'role':'assistant','content':thisdict['context']})
|
23 |
else:
|
24 |
toreturn.append({'role':thisdict['role'],'content':thisdict['context']})
|
|
|
18 |
def segmind_input_parser(input):
|
19 |
toreturn = []
|
20 |
for thisdict in input:
|
21 |
+
if(thisdict['role'] == 'ai'):
|
22 |
toreturn.append({'role':'assistant','content':thisdict['context']})
|
23 |
else:
|
24 |
toreturn.append({'role':thisdict['role'],'content':thisdict['context']})
|