Spaces:
Build error
Build error
Update app.py
Browse files61 unmodified lines626364656667686970717223 unmodified lines9697989910010110261 unmodified linesprint(f'history: {history}')conversation = []for prompt, answer in history:conversation.append(UserMessage(content=prompt))conversation.append(AssistantMessage(content=answer))# if history:# conversation.extend(history)conversation.append(UserMessage(content=message))print(f'history: {conversation}')23 unmodified linesfn=stream_chat,title="Mistral-lab",chatbot=chatbot,#type="messages",fill_height=True,examples=[["Help me study vocabulary: write a sentence for me to fill in the blank, and I'll try to pick the correct option."],61 unmodified lines6263646566676869707172737475767723 unmodified lines10110210310410510610761 unmodified linesprint(f'history: {history}')conversation = []# for prompt, answer in history:# conversation.append(UserMessage(content=prompt))# conversation.append(AssistantMessage(content=answer))for item in history:if item[role] == "user":conversation.append(UserMessage(content=item[content]))elif item[role] == "assistant":conversation.append(AssistantMessage(content=item[content]))conversation.append(UserMessage(content=message))print(f'history: {conversation}')23 unmodified linesfn=stream_chat,title="Mistral-lab",chatbot=chatbot,type="messages",fill_height=True,examples=[["Help me study vocabulary: write a sentence for me to fill in the blank, and I'll try to pick the correct option."],
app.py+11-6