CultriX commited on
Commit
21f5be1
·
verified ·
1 Parent(s): d489cba

Update run.py

Browse files
Files changed (1) hide show
  1. run.py +3 -7
run.py CHANGED
@@ -282,12 +282,12 @@ def create_agent(model_name="o1"):
282
  model_params = MODEL_CONFIGS[model_name]["litellm_params"]
283
  model_params.setdefault("custom_role_conversions", custom_role_conversions)
284
  model_params.setdefault("max_completion_tokens", 8192)
285
-
286
  # (Optional: adjust parameters here to lower temperature for more factual answers.)
 
287
  model = LiteLLMModel(**model_params)
288
  logger.info(f"Initialized LiteLLMModel with model_name={model_name}")
289
-
290
  text_limit = 100000
 
291
  browser = SimpleTextBrowser(**BROWSER_CONFIG)
292
  logger.info("Initialized SimpleTextBrowser with custom configuration.")
293
 
@@ -329,16 +329,13 @@ def create_agent(model_name="o1"):
329
  managed_agents=[text_webbrowser_agent],
330
  )
331
  logger.info("Initialized Manager CodeAgent.")
332
-
333
  return manager_agent
334
 
335
  def main():
336
  args = parse_args()
337
  logger.info(f"Received question: {args.question} with model_id={args.model_id}")
338
-
339
  agent = create_agent(model_name=args.model_id)
340
  answer = agent.run(args.question)
341
-
342
  if isinstance(answer, str):
343
  print(f"Got this answer: {answer}")
344
  else:
@@ -346,8 +343,7 @@ def main():
346
  for chunk in answer:
347
  result += chunk
348
  print(f"Got this answer: {result}")
349
-
350
  logger.info("Agent has completed processing the question.")
351
 
352
  if __name__ == "__main__":
353
- main()
 
282
  model_params = MODEL_CONFIGS[model_name]["litellm_params"]
283
  model_params.setdefault("custom_role_conversions", custom_role_conversions)
284
  model_params.setdefault("max_completion_tokens", 8192)
 
285
  # (Optional: adjust parameters here to lower temperature for more factual answers.)
286
+
287
  model = LiteLLMModel(**model_params)
288
  logger.info(f"Initialized LiteLLMModel with model_name={model_name}")
 
289
  text_limit = 100000
290
+
291
  browser = SimpleTextBrowser(**BROWSER_CONFIG)
292
  logger.info("Initialized SimpleTextBrowser with custom configuration.")
293
 
 
329
  managed_agents=[text_webbrowser_agent],
330
  )
331
  logger.info("Initialized Manager CodeAgent.")
 
332
  return manager_agent
333
 
334
  def main():
335
  args = parse_args()
336
  logger.info(f"Received question: {args.question} with model_id={args.model_id}")
 
337
  agent = create_agent(model_name=args.model_id)
338
  answer = agent.run(args.question)
 
339
  if isinstance(answer, str):
340
  print(f"Got this answer: {answer}")
341
  else:
 
343
  for chunk in answer:
344
  result += chunk
345
  print(f"Got this answer: {result}")
 
346
  logger.info("Agent has completed processing the question.")
347
 
348
  if __name__ == "__main__":
349
+ main()