Skip to content

Commit fd722a5

Browse files
vertex-sdk-botcopybara-github
authored andcommitted
fix: GenAI Client(evals) - Fix async error of agent run in run_inference
PiperOrigin-RevId: 820873226
1 parent 5b5e6bd commit fd722a5

File tree

7 files changed

+1104
-49
lines changed

7 files changed

+1104
-49
lines changed

tests/unit/vertexai/genai/replays/test_evaluate_instances.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,18 @@ def test_inference_with_prompt_template(client):
238238
assert inference_result.gcs_source is None
239239

240240

241+
def test_run_inference_with_agent(client):
242+
test_df = pd.DataFrame(
243+
{"prompt": ["agent prompt"], "session_inputs": ['{"user_id": "user_123"}']}
244+
)
245+
inference_result = client.evals.run_inference(
246+
agent="projects/977012026409/locations/us-central1/reasoningEngines/7188347537655332864",
247+
src=test_df,
248+
)
249+
assert inference_result.candidate_name == "agent"
250+
assert inference_result.gcs_source is None
251+
252+
241253
pytestmark = pytest_helper.setup(
242254
file=__file__,
243255
globals_for_file=globals(),

0 commit comments

Comments
 (0)