File tree Expand file tree Collapse file tree
libs/genai/tests/integration_tests Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1715,12 +1715,15 @@ class MatchResult(BaseModel):
17151715 response_schema = MatchResult .model_json_schema (),
17161716 )
17171717
1718+ prompt = (
1719+ "Use the google_search tool to find all details for the latest Euro "
1720+ "championship final match. Always call google_search before responding."
1721+ )
1722+
17181723 if use_streaming :
17191724 # Test streaming
17201725 chunks : list [BaseMessageChunk ] = []
1721- for chunk in llm_with_search .stream (
1722- "Search for all details for the latest Euro championship final match."
1723- ):
1726+ for chunk in llm_with_search .stream (prompt ):
17241727 assert isinstance (chunk , AIMessageChunk )
17251728 chunks .append (chunk )
17261729
@@ -1735,9 +1738,7 @@ class MatchResult(BaseModel):
17351738 assert isinstance (response , AIMessageChunk )
17361739 else :
17371740 # Test invoke
1738- response = llm_with_search .invoke ( # type: ignore[assignment]
1739- "Search for all details for the latest Euro championship final match."
1740- )
1741+ response = llm_with_search .invoke (prompt ) # type: ignore[assignment]
17411742 assert isinstance (response , AIMessage )
17421743
17431744 # Extract JSON from response content
You can’t perform that action at this time.
0 commit comments