|
34 | 34 | )
|
35 | 35 | from openai.types.responses.response_function_tool_call import ResponseFunctionToolCall
|
36 | 36 | from openai.types.responses.response_function_web_search import (
|
| 37 | + ActionSearch, |
37 | 38 | ResponseFunctionWebSearch,
|
38 | 39 | )
|
39 | 40 | from openai.types.responses.response_output_refusal import ResponseOutputRefusal
|
@@ -1602,7 +1603,10 @@ def test__construct_lc_result_from_responses_api_web_search_response() -> None:
|
1602 | 1603 | tool_choice="auto",
|
1603 | 1604 | output=[
|
1604 | 1605 | ResponseFunctionWebSearch(
|
1605 |
| - id="websearch_123", type="web_search_call", status="completed" |
| 1606 | + id="websearch_123", |
| 1607 | + type="web_search_call", |
| 1608 | + status="completed", |
| 1609 | + action=ActionSearch(type="search", query="search query"), |
1606 | 1610 | )
|
1607 | 1611 | ],
|
1608 | 1612 | )
|
@@ -1630,7 +1634,12 @@ def test__construct_lc_result_from_responses_api_web_search_response() -> None:
|
1630 | 1634 | response, output_version="responses/v1"
|
1631 | 1635 | )
|
1632 | 1636 | assert result.generations[0].message.content == [
|
1633 |
| - {"type": "web_search_call", "id": "websearch_123", "status": "completed"} |
| 1637 | + { |
| 1638 | + "type": "web_search_call", |
| 1639 | + "id": "websearch_123", |
| 1640 | + "status": "completed", |
| 1641 | + "action": {"query": "search query", "type": "search"}, |
| 1642 | + } |
1634 | 1643 | ]
|
1635 | 1644 |
|
1636 | 1645 |
|
@@ -1751,7 +1760,10 @@ def test__construct_lc_result_from_responses_api_mixed_search_responses() -> Non
|
1751 | 1760 | status="completed",
|
1752 | 1761 | ),
|
1753 | 1762 | ResponseFunctionWebSearch(
|
1754 |
| - id="websearch_123", type="web_search_call", status="completed" |
| 1763 | + id="websearch_123", |
| 1764 | + type="web_search_call", |
| 1765 | + status="completed", |
| 1766 | + action=ActionSearch(type="search", query="search query"), |
1755 | 1767 | ),
|
1756 | 1768 | ResponseFileSearchToolCall(
|
1757 | 1769 | id="filesearch_123",
|
@@ -1812,7 +1824,12 @@ def test__construct_lc_result_from_responses_api_mixed_search_responses() -> Non
|
1812 | 1824 | "annotations": [],
|
1813 | 1825 | "id": "msg_123",
|
1814 | 1826 | },
|
1815 |
| - {"type": "web_search_call", "id": "websearch_123", "status": "completed"}, |
| 1827 | + { |
| 1828 | + "type": "web_search_call", |
| 1829 | + "id": "websearch_123", |
| 1830 | + "status": "completed", |
| 1831 | + "action": {"type": "search", "query": "search query"}, |
| 1832 | + }, |
1816 | 1833 | {
|
1817 | 1834 | "type": "file_search_call",
|
1818 | 1835 | "id": "filesearch_123",
|
|
0 commit comments