Spaces:
Runtime error
Runtime error
:wrench: apply reflection system prompt only to Reflection 70B
Browse files9 unmodified lines1011121314151617181920212223249 unmodified linesapi_key=api_key)SYSTEM_PROMPT = """You are a world-class AI system, capable of complex reasoning and reflection. Reason through the query inside <thinking> tags, and then provide your final response inside <output> tags. If you detect that you made a mistake in your reasoning at any point, correct yourself inside <reflection> tags."""def respond(message, history, model):history_openai_format = [{"role": "system", "content": SYSTEM_PROMPT}]for human, assistant in history:history_openai_format.append({"role": "user", "content": human })history_openai_format.append({"role": "assistant", "content":assistant})history_openai_format.append({"role": "user", "content": message})response = client.chat.completions.create(model=model,messages= history_openai_format,9 unmodified lines1011121314151617181920212223242526272829309 unmodified linesapi_key=api_key)REFLECTION_SYSTEM_PROMPT = """You are a world-class AI system, capable of complex reasoning and reflection. Reason through the query inside <thinking> tags, and then provide your final response inside <output> tags. If you detect that you made a mistake in your reasoning at any point, correct yourself inside <reflection> tags."""def respond(message, history, model):history_openai_format = []for human, assistant in history:history_openai_format.append({"role": "user", "content": human })history_openai_format.append({"role": "assistant", "content":assistant})history_openai_format.append({"role": "user", "content": message})if model == "mattshumer/Reflection-Llama-3.1-70B":history_openai_format = [{"role": "system", "content": REFLECTION_SYSTEM_PROMPT},*history_openai_format]response = client.chat.completions.create(model=model,messages= history_openai_format,
app.py+8-2