-
Notifications
You must be signed in to change notification settings - Fork 3k
add more built-in tools #40697
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
add more built-in tools #40697
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 | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -191,6 +191,10 @@ def break_tool_call_into_messages(tool_call: ToolCall, run_id: str) -> List[Mess | |||||||||||||
arguments = { | ||||||||||||||
"ranking_options": {"ranker": options["ranker"], "score_threshold": options["score_threshold"]} | ||||||||||||||
} | ||||||||||||||
elif tool_call.details["type"] == "azure_ai_search": | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is an inconsistent access pattern when retrieving the tool type value. In this branch, the code uses subscript access (tool_call.details["type"]) while later branches use attribute access (tool_call.details.type). Standardizing the access method would enhance clarity and reduce the risk of runtime issues. Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||||||||||||||
arguments = {"input": tool_call.details["azure_ai_search"]["input"]} | ||||||||||||||
elif tool_call.details["type"] == "fabric_dataagent": | ||||||||||||||
arguments = {"input": tool_call.details["fabric_dataagent"]["input"]} | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can use the new constants here? |
||||||||||||||
else: | ||||||||||||||
# unsupported tool type, skip | ||||||||||||||
return messages | ||||||||||||||
|
@@ -231,6 +235,10 @@ def break_tool_call_into_messages(tool_call: ToolCall, run_id: str) -> List[Mess | |||||||||||||
} | ||||||||||||||
for result in tool_call.details.file_search.results | ||||||||||||||
] | ||||||||||||||
elif tool_call.details.type == "azure_ai_search": | ||||||||||||||
output = tool_call.details.azure_ai_search["output"] | ||||||||||||||
elif tool_call.details.type == "fabric_dataagent": | ||||||||||||||
Comment on lines
+238
to
+240
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The use of attribute access for obtaining the tool type here contrasts with the subscript access used earlier. Consider unifying this pattern across all branches for consistency in handling tool details.
Suggested change
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||||||||||||||
output = tool_call.details.fabric_dataagent["output"] | ||||||||||||||
except: | ||||||||||||||
return messages | ||||||||||||||
|
||||||||||||||
|
Uh oh!
There was an error while loading. Please reload this page.