Skip to content

Commit 60b010c

Browse files
authored
fixes to tools (#664)
1 parent bed9312 commit 60b010c

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

tests/functional/agent/agent_functional_test.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -301,11 +301,12 @@ def test_update_tools_of_agent(run_input_map, delete_agents_and_team_agents, Age
301301
pytest.param(
302302
{
303303
"type": "translation",
304-
"supplier": "Microsoft",
304+
"supplier": "ModernMT",
305305
"function": "translation",
306306
"query": "Translate: 'Olá, como vai você?'",
307307
"description": "Translation tool with target language",
308-
"expected_tool_input": "targetlanguage",
308+
"expected_tool_input": "Olá, como vai você?",
309+
"model": "60ddefc48d38c51c5885fdcf",
309310
},
310311
id="translation_tool",
311312
),
@@ -321,13 +322,14 @@ def test_specific_model_parameters_e2e(tool_config, delete_agents_and_team_agent
321322
model_params.numResults = 5
322323
tool = AgentFactory.create_model_tool(model=search_model, description=tool_config["description"])
323324
else:
324-
function = Function(tool_config["function"])
325-
function_params = function.get_parameters()
326-
function_params.sourcelanguage = "pt"
325+
translation_model = ModelFactory.get(tool_config["model"])
326+
model_params = translation_model.get_parameters()
327+
328+
model_params.sourcelanguage = "pt"
329+
327330
tool = AgentFactory.create_model_tool(
328-
function=function,
331+
model=translation_model,
329332
description=tool_config["description"],
330-
supplier="microsoft",
331333
)
332334

333335
# Verify tool parameters
@@ -339,7 +341,8 @@ def test_specific_model_parameters_e2e(tool_config, delete_agents_and_team_agent
339341
# Create and run agent
340342
agent = AgentFactory.create(
341343
name="Test Parameter Agent",
342-
description="Test agent with parameterized tools. You MUST use a tool for the tasks. Do not directly answer the question.",
344+
instructions="Test agent with parameterized tools. You MUST use a tool for the tasks. Do not directly answer the question.",
345+
description = "Test agent with parameterized tools",
343346
tools=[tool],
344347
llm_id="6646261c6eb563165658bbb1", # Using LLM ID from test data
345348
)

0 commit comments

Comments
 (0)