bstraehle commited on
Commit
6e4221a
·
verified ·
1 Parent(s): ea127f7

Update agents/tools/ai_tools.py

Browse files
Files changed (1) hide show
  1. agents/tools/ai_tools.py +6 -6
agents/tools/ai_tools.py CHANGED
@@ -432,21 +432,21 @@ class AITools():
432
  raise RuntimeError(f"Processing failed: {str(e)}")
433
 
434
  @tool("Algebraic Notation Tool")
435
- def algebraic_notation_tool(question: str, file_path: str, best_move: str) -> str:
436
- """Given a chess question, image file, and best move with continuation in UCI notation, answer the question in complete algebraic notation.
437
 
438
  Args:
439
  question (str): The chess question
440
  file_path (str): The image file path
441
- best_move (str): The best move with continuation in UCI notation
442
 
443
  Returns:
444
- str: Answer to the question in complete algebraic notation
445
 
446
  Raises:
447
  RuntimeError: If processing fails
448
  """
449
- print(f"🤖 AITools: algebraic_notation_tool: question={question}, file_path={file_path}, best_move={best_move}")
450
 
451
  try:
452
  client = AITools._get_client()
@@ -455,7 +455,7 @@ class AITools():
455
  img_bytes = f.read()
456
  img_b64 = base64.b64encode(img_bytes).decode("ascii")
457
 
458
- prompt = PROMPT_ALGEBRAIC_CHESS_NOTATION.format(question=question, best_move=best_move)
459
 
460
  content = types.Content(
461
  parts=[
 
432
  raise RuntimeError(f"Processing failed: {str(e)}")
433
 
434
  @tool("Algebraic Notation Tool")
435
+ def algebraic_notation_tool(question: str, file_path: str, position_evaluation: str) -> str:
436
+ """Given a chess question, image file, and position evaluation in UCI, answer the question in algebraic notation.
437
 
438
  Args:
439
  question (str): The chess question
440
  file_path (str): The image file path
441
+ position_evaluation (str): The position evaluation in UCI
442
 
443
  Returns:
444
+ str: Answer to the question in algebraic notation
445
 
446
  Raises:
447
  RuntimeError: If processing fails
448
  """
449
+ print(f"🤖 AITools: algebraic_notation_tool: question={question}, file_path={file_path}, position_evaluation={position_evaluation}")
450
 
451
  try:
452
  client = AITools._get_client()
 
455
  img_bytes = f.read()
456
  img_b64 = base64.b64encode(img_bytes).decode("ascii")
457
 
458
+ prompt = PROMPT_ALGEBRAIC_CHESS_NOTATION.format(question=question, position_evaluation=position_evaluation)
459
 
460
  content = types.Content(
461
  parts=[