mirror of
https://github.com/hwchase17/langchain.git
synced 2025-07-02 19:34:04 +00:00
openai[patch]: update test following release of openai 1.92 (#31751)
Added new required fields for `ResponseFunctionWebSearch`
This commit is contained in:
parent
61feaa4656
commit
066be383e3
@ -34,6 +34,7 @@ from openai.types.responses.response_file_search_tool_call import (
|
|||||||
)
|
)
|
||||||
from openai.types.responses.response_function_tool_call import ResponseFunctionToolCall
|
from openai.types.responses.response_function_tool_call import ResponseFunctionToolCall
|
||||||
from openai.types.responses.response_function_web_search import (
|
from openai.types.responses.response_function_web_search import (
|
||||||
|
ActionSearch,
|
||||||
ResponseFunctionWebSearch,
|
ResponseFunctionWebSearch,
|
||||||
)
|
)
|
||||||
from openai.types.responses.response_output_refusal import ResponseOutputRefusal
|
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:
|
|||||||
tool_choice="auto",
|
tool_choice="auto",
|
||||||
output=[
|
output=[
|
||||||
ResponseFunctionWebSearch(
|
ResponseFunctionWebSearch(
|
||||||
id="websearch_123", type="web_search_call", status="completed"
|
id="websearch_123",
|
||||||
|
type="web_search_call",
|
||||||
|
status="completed",
|
||||||
|
action=ActionSearch(type="search", query="search query"),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
@ -1630,7 +1634,12 @@ def test__construct_lc_result_from_responses_api_web_search_response() -> None:
|
|||||||
response, output_version="responses/v1"
|
response, output_version="responses/v1"
|
||||||
)
|
)
|
||||||
assert result.generations[0].message.content == [
|
assert result.generations[0].message.content == [
|
||||||
{"type": "web_search_call", "id": "websearch_123", "status": "completed"}
|
{
|
||||||
|
"type": "web_search_call",
|
||||||
|
"id": "websearch_123",
|
||||||
|
"status": "completed",
|
||||||
|
"action": {"query": "search query", "type": "search"},
|
||||||
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
@ -1751,7 +1760,10 @@ def test__construct_lc_result_from_responses_api_mixed_search_responses() -> Non
|
|||||||
status="completed",
|
status="completed",
|
||||||
),
|
),
|
||||||
ResponseFunctionWebSearch(
|
ResponseFunctionWebSearch(
|
||||||
id="websearch_123", type="web_search_call", status="completed"
|
id="websearch_123",
|
||||||
|
type="web_search_call",
|
||||||
|
status="completed",
|
||||||
|
action=ActionSearch(type="search", query="search query"),
|
||||||
),
|
),
|
||||||
ResponseFileSearchToolCall(
|
ResponseFileSearchToolCall(
|
||||||
id="filesearch_123",
|
id="filesearch_123",
|
||||||
@ -1812,7 +1824,12 @@ def test__construct_lc_result_from_responses_api_mixed_search_responses() -> Non
|
|||||||
"annotations": [],
|
"annotations": [],
|
||||||
"id": "msg_123",
|
"id": "msg_123",
|
||||||
},
|
},
|
||||||
{"type": "web_search_call", "id": "websearch_123", "status": "completed"},
|
{
|
||||||
|
"type": "web_search_call",
|
||||||
|
"id": "websearch_123",
|
||||||
|
"status": "completed",
|
||||||
|
"action": {"type": "search", "query": "search query"},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "file_search_call",
|
"type": "file_search_call",
|
||||||
"id": "filesearch_123",
|
"id": "filesearch_123",
|
||||||
|
@ -994,7 +994,7 @@ wheels = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "openai"
|
name = "openai"
|
||||||
version = "1.90.0"
|
version = "1.92.0"
|
||||||
source = { registry = "https://pypi.org/simple" }
|
source = { registry = "https://pypi.org/simple" }
|
||||||
dependencies = [
|
dependencies = [
|
||||||
{ name = "anyio" },
|
{ name = "anyio" },
|
||||||
@ -1006,9 +1006,9 @@ dependencies = [
|
|||||||
{ name = "tqdm" },
|
{ name = "tqdm" },
|
||||||
{ name = "typing-extensions" },
|
{ name = "typing-extensions" },
|
||||||
]
|
]
|
||||||
sdist = { url = "https://files.pythonhosted.org/packages/2d/30/0bdb712f5e25e823a76828136de6043f28bd69363886c417e05d7021420e/openai-1.90.0.tar.gz", hash = "sha256:9771982cdd5b6631af68c6a603da72ed44cd2caf73b49f717a72b71374bc565b", size = 471896 }
|
sdist = { url = "https://files.pythonhosted.org/packages/37/3f/75ad8dfe1ee4e6daacebc5a8145878c00b22c4b89e3446228d3ffccbf726/openai-1.92.0.tar.gz", hash = "sha256:acaf4ee5fca8611a09035e37ceb69a352b4a84e25b103f0fc1ccc696bf9a16f0", size = 485264 }
|
||||||
wheels = [
|
wheels = [
|
||||||
{ url = "https://files.pythonhosted.org/packages/bd/e3/0d7a2ee7ae7293e794e7945ffeda942ff5e3a94de24be27cc3eb5ba6c188/openai-1.90.0-py3-none-any.whl", hash = "sha256:e5dcb5498ea6b42fec47546d10f1bcc05fb854219a7d953a5ba766718b212a02", size = 734638 },
|
{ url = "https://files.pythonhosted.org/packages/68/66/8f85019b7943e4976d931fdb0e2b973090b4dac999c3e90844d2336f1184/openai-1.92.0-py3-none-any.whl", hash = "sha256:99210715bad1a4de5a387993aca7e4e8e5a742f1e185eefe2f805001cc2c21f3", size = 753397 },
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
Loading…
Reference in New Issue
Block a user