Update app.py
Browse files2 unmodified lines3456789101122 unmodified lines3435363738394020 unmodified lines616263646566672 unmodified linesfrom openai import OpenAIfrom optillm.moa import mixture_of_agentsfrom optillm.mcts import chat_with_mctsfrom optillm.bon import best_of_n_samplingfrom optillm.cot_reflection import cot_reflectionAPI_KEY = os.environ.get("OPENROUTER_API_KEY")22 unmodified lines# response = ""final_response = mixture_of_agents(system_message, message, client, model)return final_response# for message in client.chat_completion(20 unmodified linesvalue="nousresearch/hermes-3-llama-3.1-405b:free", label="Model", info="Choose the base model"),gr.Dropdown(["bon", "mcts", "moa", "cot_reflection"], value="moa", label="Approach", info="Choose the approach"),gr.Textbox(value="", label="System message"),gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),2 unmodified lines34567822 unmodified lines3132333435363720 unmodified lines585960616263642 unmodified linesfrom openai import OpenAIfrom optillm.cot_reflection import cot_reflectionAPI_KEY = os.environ.get("OPENROUTER_API_KEY")22 unmodified lines# response = ""final_response = cot_reflection(system_message, message, client, model)return final_response# for message in client.chat_completion(20 unmodified linesvalue="nousresearch/hermes-3-llama-3.1-405b:free", label="Model", info="Choose the base model"),gr.Dropdown(["leap", "plansearch", "rstar", "cot_reflection"], value="cot_reflection", label="Approach", info="Choose the approach"),gr.Textbox(value="", label="System message"),gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
app.py+2-5