gdms commited on
Commit
d272ca0
·
1 Parent(s): 2974878

Ajuste Chess + execução tabela comutativa

Browse files
Files changed (4) hide show
  1. agent.py +1 -1
  2. constantes.py +3 -2
  3. perguntas.json +1 -0
  4. tools.py +3 -1
agent.py CHANGED
@@ -64,7 +64,7 @@ class Agent:
64
  ]
65
  }
66
  )
67
- print('........ Versão: Execução Frase Invertida e Chess .....')
68
  print(f"Resposta LLM: {response}")
69
  # Extrair o conteúdo das mensagens do tipo AIMessage
70
  final_content = ""
 
64
  ]
65
  }
66
  )
67
+ print('........ Versão: Ajuste Chess + execução tabela comutativa .....')
68
  print(f"Resposta LLM: {response}")
69
  # Extrair o conteúdo das mensagens do tipo AIMessage
70
  final_content = ""
constantes.py CHANGED
@@ -35,7 +35,8 @@ HUGGINGFACE_DATASET_URL_TEMPLATE = (
35
  LISTA_TASKS_PROCESSAR = [
36
  # "8e867cd7-cff9-4e6c-867a-ff5ddc2550be",
37
  # "a1e91b78-d3d8-4675-bb8d-62741b4b68a6",
38
- "2d83110e-a098-4ebb-9987-066c06fa42d0",
39
- "cca530fc-4052-43b2-b130-b30968d8aa44"
 
40
 
41
  ]
 
35
  LISTA_TASKS_PROCESSAR = [
36
  # "8e867cd7-cff9-4e6c-867a-ff5ddc2550be",
37
  # "a1e91b78-d3d8-4675-bb8d-62741b4b68a6",
38
+ # "2d83110e-a098-4ebb-9987-066c06fa42d0",
39
+ "cca530fc-4052-43b2-b130-b30968d8aa44",
40
+ "6f37996b-2ac7-44b0-8e68-6d28256631b4"
41
 
42
  ]
perguntas.json CHANGED
@@ -28,6 +28,7 @@
28
  "detalhes": "Se quiser resposta direta precisa do gpt4o, caso contrário utilizar chessboard-image-parser para gerar um fen da imagem e repassar ao gpt-4o-mini, "
29
  },
30
  {
 
31
  "task_id": "4fc2f1ae-8625-45b5-ab34-ad4433bc21f8",
32
  "question": "Who nominated the only Featured Article on English Wikipedia about a dinosaur that was promoted in November 2016?",
33
  "Level": "1",
 
28
  "detalhes": "Se quiser resposta direta precisa do gpt4o, caso contrário utilizar chessboard-image-parser para gerar um fen da imagem e repassar ao gpt-4o-mini, "
29
  },
30
  {
31
+ "nao_testado": "true",
32
  "task_id": "4fc2f1ae-8625-45b5-ab34-ad4433bc21f8",
33
  "question": "Who nominated the only Featured Article on English Wikipedia about a dinosaur that was promoted in November 2016?",
34
  "Level": "1",
tools.py CHANGED
@@ -107,7 +107,9 @@ def chess_image_to_fen_tool(image_path:str, current_player: Literal["black", "wh
107
  if current_player not in ["black", "white"]:
108
  raise ValueError("current_player must be 'black' or 'white'")
109
 
110
- base64_image = Image_Util.encode_image_to_base64(image_path)
 
 
111
  if not base64_image:
112
  raise ValueError("Failed to encode image to base64.")
113
  base64_image_encoded = f"data:image/jpeg;base64,{base64_image}"
 
107
  if current_player not in ["black", "white"]:
108
  raise ValueError("current_player must be 'black' or 'white'")
109
 
110
+ final_image_path= os.path.join(AGENTS_FILES_PATH, image_path)
111
+
112
+ base64_image = Image_Util.encode_image_to_base64(final_image_path)
113
  if not base64_image:
114
  raise ValueError("Failed to encode image to base64.")
115
  base64_image_encoded = f"data:image/jpeg;base64,{base64_image}"