Spaces:
Runtime error
Runtime error
Update app.py
Browse files40 unmodified lines414243444546475 unmodified lines5354555657585940 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")messages = [{"role": "system", "content": system_message}]if history:5 unmodified linesfor message_chunk in client.chat_completion(messages,max_tokens=100,stream=True):token = message_chunk['choices'][0]['delta'].get('content', '')40 unmodified lines414243444546475 unmodified lines5354555657585940 unmodified linesdef respond(message, history):info = pull_relevant_info(message, top_k=3)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 linesfor message_chunk in client.chat_completion(messages,max_tokens=1000,stream=True):token = message_chunk['choices'][0]['delta'].get('content', '')
app.py+2-2