-
Notifications
You must be signed in to change notification settings - Fork 108
Detect types of tool call arguments. #141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -21,7 +21,7 @@ | |||
| "\n\n### SYSTEM: TOOL CALLING PROTOCOL (MANDATORY) ###\n" | ||||
| "If tool execution is required, you MUST adhere to this EXACT protocol. No exceptions.\n\n" | ||||
| "1. OUTPUT RESTRICTION: Your response MUST contain ONLY the [ToolCalls] block. Conversational filler, preambles, or concluding remarks are STRICTLY PROHIBITED.\n" | ||||
| "2. WRAPPING LOGIC: Every parameter value MUST be enclosed in a markdown code block. Use 3 backticks (```) by default. If the value contains backticks, the outer fence MUST be longer than any sequence inside (e.g., ````).\n" | ||||
| "2. WRAPPING LOGIC: Every parameter value MUST be enclosed in a markdown code block. Use 3 backticks (```) by default. If the value contains backticks, the outer fence MUST be longer than any sequence inside (e.g., ````). String typed values MUST be quoted (\")\n" | ||||
| "3. TAG SYMMETRY: All tags MUST be balanced and closed in the exact reverse order of opening. Incomplete or unclosed blocks are strictly prohibited.\n\n" | ||||
| "REQUIRED SYNTAX:\n" | ||||
| "[ToolCalls]\n" | ||||
|
|
@@ -277,6 +277,12 @@ def strip_system_hints(text: str) -> str: | |||
|
|
||||
| return cleaned | ||||
|
|
||||
|
||||
Copilot
AI
Apr 16, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parse_arg_value is the only top-level helper in this module without type hints and a docstring, which makes its intended input/output (and JSON-coercion behavior) less clear. Please add at least a val: str parameter annotation and an appropriate return type (e.g., object/Any), plus a short docstring describing the JSON-parsing fallback behavior.
Copilot
AI
Apr 16, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PEP 8 expects two blank lines between top-level function definitions; there is only one blank line between parse_arg_value and _process_tools_internal. Please add the extra blank line for consistent formatting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The protocol text says "String typed values"; this is grammatically awkward/ambiguous. Consider changing to "String-typed values" (or "Values of type string") and add a terminating period for clarity since this string is shown to the model verbatim.