Update agents/tools/ai_tools.py
Browse files- agents/tools/ai_tools.py +17 -9
agents/tools/ai_tools.py
CHANGED
|
@@ -17,7 +17,15 @@ from agents.models.llms import (
|
|
| 17 |
LLM_IMAGE_TO_FEN,
|
| 18 |
LLM_ALGEBRAIC_NOTATION,
|
| 19 |
LLM_FINAL_ANSWER,
|
| 20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
THINKING_LEVEL_FINAL_ANSWER
|
| 22 |
)
|
| 23 |
from agents.models.prompts import (
|
|
@@ -52,7 +60,7 @@ class AITools():
|
|
| 52 |
contents=[file, question],
|
| 53 |
config=types.GenerateContentConfig(
|
| 54 |
thinking_config=types.ThinkingConfig(
|
| 55 |
-
thinking_level=
|
| 56 |
)
|
| 57 |
)
|
| 58 |
)
|
|
@@ -95,7 +103,7 @@ class AITools():
|
|
| 95 |
config=types.GenerateContentConfig(
|
| 96 |
tools=[types.Tool(google_search=types.GoogleSearch())],
|
| 97 |
thinking_config=types.ThinkingConfig(
|
| 98 |
-
thinking_level=
|
| 99 |
)
|
| 100 |
)
|
| 101 |
)
|
|
@@ -227,7 +235,7 @@ class AITools():
|
|
| 227 |
),
|
| 228 |
config=types.GenerateContentConfig(
|
| 229 |
thinking_config=types.ThinkingConfig(
|
| 230 |
-
thinking_level=
|
| 231 |
)
|
| 232 |
)
|
| 233 |
).strip()
|
|
@@ -276,7 +284,7 @@ class AITools():
|
|
| 276 |
contents=contents,
|
| 277 |
config=types.GenerateContentConfig(
|
| 278 |
thinking_config=types.ThinkingConfig(
|
| 279 |
-
thinking_level=
|
| 280 |
)
|
| 281 |
)
|
| 282 |
)
|
|
@@ -312,7 +320,7 @@ class AITools():
|
|
| 312 |
config=types.GenerateContentConfig(
|
| 313 |
tools=[types.Tool(code_execution=types.ToolCodeExecution)],
|
| 314 |
thinking_config=types.ThinkingConfig(
|
| 315 |
-
thinking_level=
|
| 316 |
)
|
| 317 |
),
|
| 318 |
)
|
|
@@ -352,7 +360,7 @@ class AITools():
|
|
| 352 |
config=types.GenerateContentConfig(
|
| 353 |
tools=[types.Tool(code_execution=types.ToolCodeExecution)],
|
| 354 |
thinking_config=types.ThinkingConfig(
|
| 355 |
-
thinking_level=
|
| 356 |
)
|
| 357 |
),
|
| 358 |
)
|
|
@@ -408,7 +416,7 @@ class AITools():
|
|
| 408 |
contents=[content],
|
| 409 |
config=types.GenerateContentConfig(
|
| 410 |
thinking_config=types.ThinkingConfig(
|
| 411 |
-
thinking_level=
|
| 412 |
)
|
| 413 |
)
|
| 414 |
)
|
|
@@ -471,7 +479,7 @@ class AITools():
|
|
| 471 |
contents=[content],
|
| 472 |
config=types.GenerateContentConfig(
|
| 473 |
thinking_config=types.ThinkingConfig(
|
| 474 |
-
thinking_level=
|
| 475 |
)
|
| 476 |
)
|
| 477 |
)
|
|
|
|
| 17 |
LLM_IMAGE_TO_FEN,
|
| 18 |
LLM_ALGEBRAIC_NOTATION,
|
| 19 |
LLM_FINAL_ANSWER,
|
| 20 |
+
|
| 21 |
+
THINKING_LEVEL_WEB_SEARCH,
|
| 22 |
+
THINKING_LEVEL_MEDIA_ANALYSIS,
|
| 23 |
+
THINKING_LEVEL_YOUTUBE_ANALYSIS,
|
| 24 |
+
THINKING_LEVEL_DOCUMENT_ANALYSIS,
|
| 25 |
+
THINKING_LEVEL_CODE_GENERATION,
|
| 26 |
+
THINKING_LEVEL_CODE_EXECUTION,
|
| 27 |
+
THINKING_LEVEL_IMAGE_TO_FEN,
|
| 28 |
+
THINKING_LEVEL_ALGEBRAIC_NOTATION,
|
| 29 |
THINKING_LEVEL_FINAL_ANSWER
|
| 30 |
)
|
| 31 |
from agents.models.prompts import (
|
|
|
|
| 60 |
contents=[file, question],
|
| 61 |
config=types.GenerateContentConfig(
|
| 62 |
thinking_config=types.ThinkingConfig(
|
| 63 |
+
thinking_level=THINKING_LEVEL_MEDIA_ANALYSIS
|
| 64 |
)
|
| 65 |
)
|
| 66 |
)
|
|
|
|
| 103 |
config=types.GenerateContentConfig(
|
| 104 |
tools=[types.Tool(google_search=types.GoogleSearch())],
|
| 105 |
thinking_config=types.ThinkingConfig(
|
| 106 |
+
thinking_level=THINKING_LEVEL_WEB_SEARCH
|
| 107 |
)
|
| 108 |
)
|
| 109 |
)
|
|
|
|
| 235 |
),
|
| 236 |
config=types.GenerateContentConfig(
|
| 237 |
thinking_config=types.ThinkingConfig(
|
| 238 |
+
thinking_level=THINKING_LEVEL_YOUTUBE_ANALYSIS
|
| 239 |
)
|
| 240 |
)
|
| 241 |
).strip()
|
|
|
|
| 284 |
contents=contents,
|
| 285 |
config=types.GenerateContentConfig(
|
| 286 |
thinking_config=types.ThinkingConfig(
|
| 287 |
+
thinking_level=THINKING_LEVEL_DOCUMENT_ANALYSIS
|
| 288 |
)
|
| 289 |
)
|
| 290 |
)
|
|
|
|
| 320 |
config=types.GenerateContentConfig(
|
| 321 |
tools=[types.Tool(code_execution=types.ToolCodeExecution)],
|
| 322 |
thinking_config=types.ThinkingConfig(
|
| 323 |
+
thinking_level=THINKING_LEVEL_CODE_GENERATION
|
| 324 |
)
|
| 325 |
),
|
| 326 |
)
|
|
|
|
| 360 |
config=types.GenerateContentConfig(
|
| 361 |
tools=[types.Tool(code_execution=types.ToolCodeExecution)],
|
| 362 |
thinking_config=types.ThinkingConfig(
|
| 363 |
+
thinking_level=THINKING_LEVEL_CODE_EXECUTION
|
| 364 |
)
|
| 365 |
),
|
| 366 |
)
|
|
|
|
| 416 |
contents=[content],
|
| 417 |
config=types.GenerateContentConfig(
|
| 418 |
thinking_config=types.ThinkingConfig(
|
| 419 |
+
thinking_level=THINKING_LEVEL_IMAGE_TO_FEN
|
| 420 |
)
|
| 421 |
)
|
| 422 |
)
|
|
|
|
| 479 |
contents=[content],
|
| 480 |
config=types.GenerateContentConfig(
|
| 481 |
thinking_config=types.ThinkingConfig(
|
| 482 |
+
thinking_level=THINKING_LEVEL_ALGEBRAIC_NOTATION
|
| 483 |
)
|
| 484 |
)
|
| 485 |
)
|