Tonic commited on
Commit
baa3c78
Β·
unverified Β·
1 Parent(s): 00aec15

attempts to improve mcp

Browse files
Files changed (1) hide show
  1. app.py +7 -6
app.py CHANGED
@@ -139,7 +139,7 @@ def chat_handler(
139
  chat_history: list = None
140
  ):
141
  """
142
- Handles a single chat interaction with the Kimina Prover model designed for competition-style problem solving and rigorous formal reasoning, achieving state-of-the-art results on the miniF2F benchmark. It supports long context windows (up to 32K tokens) and is capable of both formal and informal mathematical reasoning. This function manages prompt construction, model inference, and output formatting for the Gradio interface, enabling interactive theorem proving and mathematical problem solving.
143
 
144
  Args:
145
  user_message (str): The user's input message or formal statement to be solved or discussed by the model. This can be a Lean 4 goal, theorem, or mathematical problem statement.
@@ -156,13 +156,14 @@ def chat_handler(
156
  )
157
 
158
  Example:
159
- >> user_message = "Goal:\n X : UU\n Y : UU\n P : UU\n xp : (X β†’ P) β†’ P\n yp : (Y β†’ P) β†’ P\n X0 : X Γ— Y β†’ P\n x : X\n ============================\n (Y β†’ P)"
160
- >> informal_prefix = "/-Explain using mathematics-/\n"
161
- >> max_tokens = 1234
162
- >> chat_history = None
163
- >> display_history, output_data_json, code, chat_history = chat_handler(user_message, informal_prefix, max_tokens, chat_history)
164
  # display_history contains the chat turns, output_data_json contains the full model output, code contains extracted Lean4 code.
165
  """
 
166
  if not chat_history or len(chat_history) < 2:
167
  chat_history = init_chat(user_message, informal_prefix)
168
  display_history = [("user", user_message)]
 
139
  chat_history: list = None
140
  ):
141
  """
142
+ Handles a single chat interaction with the Kimina Prover model designed for competition-style problem solving it is capable of both formal and informal mathematical reasoning and problem solving.
143
 
144
  Args:
145
  user_message (str): The user's input message or formal statement to be solved or discussed by the model. This can be a Lean 4 goal, theorem, or mathematical problem statement.
 
156
  )
157
 
158
  Example:
159
+ >>> user_message = "Goal:\n X : UU\n Y : UU\n P : UU\n xp : (X β†’ P) β†’ P\n yp : (Y β†’ P) β†’ P\n X0 : X Γ— Y β†’ P\n x : X\n ============================\n (Y β†’ P)"
160
+ >>> informal_prefix = "/-Explain using mathematics-/\n"
161
+ >>> max_tokens = 1234
162
+ >>> chat_history = None
163
+ >>> display_history, output_data_json, code, chat_history = chat_handler(user_message, informal_prefix, max_tokens, chat_history)
164
  # display_history contains the chat turns, output_data_json contains the full model output, code contains extracted Lean4 code.
165
  """
166
+
167
  if not chat_history or len(chat_history) < 2:
168
  chat_history = init_chat(user_message, informal_prefix)
169
  display_history = [("user", user_message)]