Skip to content

Commit 2fc6595

Browse files
committed
update
1 parent fb61792 commit 2fc6595

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

sdk/ai/azure-ai-agents/azure/ai/agents/models/_patch.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1945,7 +1945,7 @@ def submit_function_call_output(
19451945
run: ThreadRun,
19461946
tool_call: RequiredFunctionToolCall,
19471947
tool_call_details: RequiredFunctionToolCallDetails,
1948-
**kwargs,
1948+
**kwargs: Any,
19491949
) -> Optional[Any]:
19501950
"""Produce (or override) the output for a required function tool call.
19511951
@@ -1968,7 +1968,7 @@ def submit_mcp_tool_approval(
19681968
self,
19691969
run: ThreadRun,
19701970
tool_call: RequiredMcpToolCall,
1971-
**kwargs,
1971+
**kwargs: Any,
19721972
) -> Optional[ToolApproval]:
19731973
# NOTE: Implementation intentionally returns None; override in subclasses for real approval logic.
19741974
"""Return a ``ToolApproval`` for an MCP tool call or ``None`` to indicate rejection/cancellation.

sdk/ai/azure-ai-agents/samples/agents_tools/sample_agents_functions_in_create_and_process.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,11 @@
3535
RequiredFunctionToolCallDetails,
3636
)
3737

38-
current_path = os.path.dirname(__file__)
39-
root_path = os.path.abspath(os.path.join(current_path, os.pardir, os.pardir))
40-
if root_path not in sys.path:
41-
sys.path.insert(0, root_path)
38+
# Add package directory to sys.path to import user_functions
39+
current_dir = os.path.dirname(os.path.abspath(__file__))
40+
package_dir = os.path.abspath(os.path.join(current_dir, os.pardir, os.pardir))
41+
if package_dir not in sys.path:
42+
sys.path.insert(0, package_dir)
4243
from samples.utils.user_functions import user_functions
4344

4445
project_client = AIProjectClient(
@@ -52,7 +53,7 @@
5253

5354
class MyRunHandler(RunHandler):
5455
def submit_function_call_output(
55-
self, run: ThreadRun, tool_call: RequiredFunctionToolCall, tool_call_details: RequiredFunctionToolCallDetails
56+
self, run: ThreadRun, tool_call: RequiredFunctionToolCall, tool_call_details: RequiredFunctionToolCallDetails, **kwargs: Any
5657
) -> Optional[Any]:
5758
print(f"Call function: {tool_call_details.name}")
5859
return functions.execute(tool_call)

0 commit comments

Comments
 (0)