Spaces:
Runtime error
Runtime error
Update app.py
Browse files55 unmodified lines56575859606161626364651 unmodified line6768697071727355 unmodified lines return "Keep going! You're doing great."
def respond(message, history): user_knowledge = get_top_chunks(message) messages = [{ "role": "system", "content": "You are a big sister chatbot named Nessie. You help people feel better in a simple manner. You need to be kind! please! Always reply in 3 sentences. Or if a list, 5 bullet points. Do NOT stop mid-sentence, even if more tokens are needed. When the user is asking for ideas give 5 max, as you don't want to overwhelm them" "content": f"Get information from {user_knowledge}. You are a big sister chatbot named Nessie. You help people feel better in a simple manner. You need to be kind! please! Always reply in 3 sentences. Or if a list, 5 bullet points. Do NOT stop mid-sentence, even if more tokens are needed. When the user is asking for ideas give 5 max, as you don't want to overwhelm them" }] context = get_top_chunks(message) if history:1 unmodified line messages.append({"role": "user", "content": message})
user_context = f"{message}\nInformation: {context}"
messages.append({"role": "user", "content": user_context})
response = ""app.py+3-1