Update app.py
Browse files
app.py
CHANGED
|
@@ -445,7 +445,7 @@ SYSTEM_MESSAGE = """You are a concise AI assistant with access to the following
|
|
| 445 |
- wiki_get_page(title: string) → string
|
| 446 |
- youtube_transcript(video_id: string) → string
|
| 447 |
- reverse_text(text: string) → string
|
| 448 |
-
- find_non_commutative(table: dict)
|
| 449 |
- libretext_extract(url: string, selector: string) → string
|
| 450 |
- classify_vegetables(items: list[string]) → list[string]
|
| 451 |
- execute_code(code: string) → string
|
|
@@ -457,7 +457,16 @@ SYSTEM_MESSAGE = """You are a concise AI assistant with access to the following
|
|
| 457 |
- find_chess_mate_move(fen: string) -> string
|
| 458 |
When you need to use a tool, respond exactly with:
|
| 459 |
Action: <tool_name>(<arg_name>=<value>, ...)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 460 |
Then wait for the tool’s output before continuing.
|
|
|
|
| 461 |
If a tool requires a file path, assume the file is accessible in the current environment.
|
| 462 |
If a question involves an image or audio file, state that you need the content extracted first (e.g., text from audio, FEN from chess image) before you can proceed.
|
| 463 |
Once you have all the information, provide your final answer in as few words as possible, with no extra commentary or prefixes.
|
|
|
|
| 445 |
- wiki_get_page(title: string) → string
|
| 446 |
- youtube_transcript(video_id: string) → string
|
| 447 |
- reverse_text(text: string) → string
|
| 448 |
+
- find_non_commutative(table: dict) -> list : Returns sorted list of non-commutative elements or a list containing an error message. Example table format: {('a','a'):'a', ('a','b'):'c', ('b','a'):'d', ...}
|
| 449 |
- libretext_extract(url: string, selector: string) → string
|
| 450 |
- classify_vegetables(items: list[string]) → list[string]
|
| 451 |
- execute_code(code: string) → string
|
|
|
|
| 457 |
- find_chess_mate_move(fen: string) -> string
|
| 458 |
When you need to use a tool, respond exactly with:
|
| 459 |
Action: <tool_name>(<arg_name>=<value>, ...)
|
| 460 |
+
|
| 461 |
+
IMPORTANT FORMATTING:
|
| 462 |
+
- Strings must be in quotes (e.g., 'value' or "value").
|
| 463 |
+
- Lists look like ['item1', 'item2'].
|
| 464 |
+
- Dictionaries look like {'key1': 'value1', 'key2': 'value2'}.
|
| 465 |
+
- For the find_non_commutative tool, the 'table' argument MUST be a valid Python dictionary with tuple keys, like this:
|
| 466 |
+
Action: find_non_commutative(table={('a','a'):'a', ('a','b'):'c', ('b','a'):'d', ('b','b'):'e'})
|
| 467 |
+
|
| 468 |
Then wait for the tool’s output before continuing.
|
| 469 |
+
If a tool returns an error message starting with 'Error:', treat that as the observation.
|
| 470 |
If a tool requires a file path, assume the file is accessible in the current environment.
|
| 471 |
If a question involves an image or audio file, state that you need the content extracted first (e.g., text from audio, FEN from chess image) before you can proceed.
|
| 472 |
Once you have all the information, provide your final answer in as few words as possible, with no extra commentary or prefixes.
|