Spaces:
Runtime error
Runtime error
Update app.py
Browse files40 unmodified lines41424344444546475 unmodified lines535455565657585940 unmodified linesdef respond(message, history): info = pull_relevant_info(message, top_k=3) system_message = (f"You are a friendly chatbot. Use the following information to help answer the user's question:\n\n{info}\n\n") system_message = (f"You are a helpful and kind teacher. You respond clearly in no more than three complete sentences. Use the following information to help answer the user's question:\n\n{info}\n\n") messages = [{"role": "system", "content": system_message}] if history:5 unmodified lines for message_chunk in client.chat_completion( messages, max_tokens=100, max_tokens=1000, stream=True ): token = message_chunk['choices'][0]['delta'].get('content', '')app.py+2-2