unique-search-proxy-sdk 2026.44.0.dev4__tar.gz → 2026.44.0.dev6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/PKG-INFO +2 -2
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/pyproject.toml +2 -2
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_generated/api/agent_search/agent_search_stream_v1_agent_search_stream_post.py +37 -1
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_generated/api/agent_search/agent_search_v1_agent_search_post.py +37 -1
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_generated/api/configuration/list_providers_v1_configuration_providers_get.py +37 -1
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_generated/api/crawl/crawl_v1_crawl_post.py +37 -1
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_generated/api/search/search_v1_search_post.py +37 -1
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_generated/models/__init__.py +2 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_generated/models/agent_search_response.py +32 -3
- unique_search_proxy_sdk-2026.44.0.dev6/unique_search_proxy_sdk/_generated/models/answer_span_citation.py +132 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_transport.py +6 -5
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/README.md +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/__init__.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_endpoint.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_generated/__init__.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_generated/api/__init__.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_generated/api/agent_search/__init__.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_generated/api/configuration/__init__.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_generated/api/crawl/__init__.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_generated/api/health/__init__.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_generated/api/health/health_health_get.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_generated/api/health/ready_ready_get.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_generated/api/search/__init__.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_generated/client.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_generated/errors.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_generated/models/basic_crawl_request.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_generated/models/bing_agent_search_request.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_generated/models/bing_agent_search_request_freshness_type_0.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_generated/models/bing_agent_search_request_market_type_0.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_generated/models/brave_search_request.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_generated/models/brave_search_request_country_type_0.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_generated/models/brave_search_request_result_filter_type_0_item.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_generated/models/brave_search_request_safe_search.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_generated/models/brave_search_request_search_lang_type_0.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_generated/models/brave_search_request_ui_language.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_generated/models/brave_search_request_units_type_0.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_generated/models/content_types.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_generated/models/crawl_response.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_generated/models/crawl_url_result.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_generated/models/custom_api_request_method.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_generated/models/custom_api_search_request.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_generated/models/firecrawl_crawl_request.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_generated/models/firecrawl_crawl_request_proxy_mode.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_generated/models/firecrawl_crawl_request_scrape_headers_type_0.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_generated/models/google_search_request.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_generated/models/google_search_request_safe_search.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_generated/models/google_search_request_site_search_filter_type_0.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_generated/models/health_health_get_response_health_health_get.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_generated/models/http_validation_error.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_generated/models/jina_crawl_request.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_generated/models/jina_crawl_request_engine.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_generated/models/jina_crawl_request_retain_images_type_0.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_generated/models/jina_crawl_request_return_format.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_generated/models/per_url_error.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_generated/models/perplexity_search_request.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_generated/models/perplexity_search_request_search_context_size.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_generated/models/perplexity_search_request_search_recency_filter_type_0.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_generated/models/providers_list_response.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_generated/models/ready_ready_get_response_ready_ready_get.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_generated/models/search_response.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_generated/models/tavily_crawl_request.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_generated/models/tavily_crawl_request_extract_depth.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_generated/models/tavily_crawl_request_output_format.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_generated/models/validation_error.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_generated/models/validation_error_context.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_generated/models/vertex_ai_agent_search_request.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_generated/models/web_search_result.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_generated/types.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_http.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/_typed_endpoints.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/agent_search_client.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/client.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/converters.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/crawl_client.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/errors.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/search_client.py +0 -0
- {unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/unique_search_proxy_sdk/typing_checks.py +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: unique-search-proxy-sdk
|
|
3
|
-
Version: 2026.44.0.
|
|
3
|
+
Version: 2026.44.0.dev6
|
|
4
4
|
Summary: Async HTTP client for the Unique Search Proxy API
|
|
5
5
|
Author: ThePhilAz
|
|
6
6
|
Author-email: ThePhilAz <rami.azouz@philico.com>
|
|
7
7
|
Requires-Dist: attrs>=24.3.0,<26
|
|
8
8
|
Requires-Dist: httpx>=0.28.0,<0.29.0
|
|
9
9
|
Requires-Dist: pydantic>=2.12.5,<3.0.0
|
|
10
|
-
Requires-Dist: unique-search-proxy-core>=2026.44.0.
|
|
10
|
+
Requires-Dist: unique-search-proxy-core>=2026.44.0.dev11,<2026.44.0rc0
|
|
11
11
|
Requires-Python: >=3.12
|
|
12
12
|
Description-Content-Type: text/markdown
|
|
13
13
|
|
{unique_search_proxy_sdk-2026.44.0.dev4 → unique_search_proxy_sdk-2026.44.0.dev6}/pyproject.toml
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "unique-search-proxy-sdk"
|
|
3
|
-
version = "2026.44.0.
|
|
3
|
+
version = "2026.44.0.dev6"
|
|
4
4
|
description = "Async HTTP client for the Unique Search Proxy API"
|
|
5
5
|
authors = [{ name = "ThePhilAz", email = "rami.azouz@philico.com" }]
|
|
6
6
|
readme = "README.md"
|
|
@@ -9,7 +9,7 @@ dependencies = [
|
|
|
9
9
|
"attrs>=24.3.0,<26",
|
|
10
10
|
"httpx>=0.28.0,<0.29.0",
|
|
11
11
|
"pydantic>=2.12.5,<3.0.0",
|
|
12
|
-
"unique-search-proxy-core>=2026.44.0.
|
|
12
|
+
"unique-search-proxy-core>=2026.44.0.dev11,<2026.44.0rc0",
|
|
13
13
|
]
|
|
14
14
|
|
|
15
15
|
[dependency-groups]
|
|
@@ -8,7 +8,7 @@ from ...client import AuthenticatedClient, Client
|
|
|
8
8
|
from ...models.bing_agent_search_request import BingAgentSearchRequest
|
|
9
9
|
from ...models.http_validation_error import HTTPValidationError
|
|
10
10
|
from ...models.vertex_ai_agent_search_request import VertexAiAgentSearchRequest
|
|
11
|
-
from ...types import Response, Unset
|
|
11
|
+
from ...types import UNSET, Response, Unset
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
def _get_kwargs(
|
|
@@ -17,6 +17,8 @@ def _get_kwargs(
|
|
|
17
17
|
x_unique_company_id: str | Unset = "local",
|
|
18
18
|
x_unique_user_id: str | Unset = "local",
|
|
19
19
|
x_unique_chat_id: str | Unset = "local",
|
|
20
|
+
x_unique_entry_point: str | Unset = "unknown",
|
|
21
|
+
x_unique_message_id: None | str | Unset = UNSET,
|
|
20
22
|
) -> dict[str, Any]:
|
|
21
23
|
headers: dict[str, Any] = {}
|
|
22
24
|
if not isinstance(x_unique_company_id, Unset):
|
|
@@ -28,6 +30,12 @@ def _get_kwargs(
|
|
|
28
30
|
if not isinstance(x_unique_chat_id, Unset):
|
|
29
31
|
headers["x-unique-chat-id"] = x_unique_chat_id
|
|
30
32
|
|
|
33
|
+
if not isinstance(x_unique_entry_point, Unset):
|
|
34
|
+
headers["x-unique-entry-point"] = x_unique_entry_point
|
|
35
|
+
|
|
36
|
+
if not isinstance(x_unique_message_id, Unset):
|
|
37
|
+
headers["x-unique-message-id"] = x_unique_message_id
|
|
38
|
+
|
|
31
39
|
_kwargs: dict[str, Any] = {
|
|
32
40
|
"method": "post",
|
|
33
41
|
"url": "/v1/agent-search/stream",
|
|
@@ -80,6 +88,8 @@ def sync_detailed(
|
|
|
80
88
|
x_unique_company_id: str | Unset = "local",
|
|
81
89
|
x_unique_user_id: str | Unset = "local",
|
|
82
90
|
x_unique_chat_id: str | Unset = "local",
|
|
91
|
+
x_unique_entry_point: str | Unset = "unknown",
|
|
92
|
+
x_unique_message_id: None | str | Unset = UNSET,
|
|
83
93
|
) -> Response[Any | HTTPValidationError]:
|
|
84
94
|
"""Stream an agent-based grounded search (SSE)
|
|
85
95
|
|
|
@@ -87,6 +97,9 @@ def sync_detailed(
|
|
|
87
97
|
x_unique_company_id (str | Unset): Tenant company identifier. Default: 'local'.
|
|
88
98
|
x_unique_user_id (str | Unset): Tenant user identifier. Default: 'local'.
|
|
89
99
|
x_unique_chat_id (str | Unset): Tenant chat or session identifier. Default: 'local'.
|
|
100
|
+
x_unique_entry_point (str | Unset): Service where the search entered the platform.
|
|
101
|
+
Default: 'unknown'.
|
|
102
|
+
x_unique_message_id (None | str | Unset): Message identifier, reserved for analytics.
|
|
90
103
|
body (BingAgentSearchRequest | VertexAiAgentSearchRequest):
|
|
91
104
|
|
|
92
105
|
Raises:
|
|
@@ -102,6 +115,8 @@ def sync_detailed(
|
|
|
102
115
|
x_unique_company_id=x_unique_company_id,
|
|
103
116
|
x_unique_user_id=x_unique_user_id,
|
|
104
117
|
x_unique_chat_id=x_unique_chat_id,
|
|
118
|
+
x_unique_entry_point=x_unique_entry_point,
|
|
119
|
+
x_unique_message_id=x_unique_message_id,
|
|
105
120
|
)
|
|
106
121
|
|
|
107
122
|
response = client.get_httpx_client().request(
|
|
@@ -118,6 +133,8 @@ def sync(
|
|
|
118
133
|
x_unique_company_id: str | Unset = "local",
|
|
119
134
|
x_unique_user_id: str | Unset = "local",
|
|
120
135
|
x_unique_chat_id: str | Unset = "local",
|
|
136
|
+
x_unique_entry_point: str | Unset = "unknown",
|
|
137
|
+
x_unique_message_id: None | str | Unset = UNSET,
|
|
121
138
|
) -> Any | HTTPValidationError | None:
|
|
122
139
|
"""Stream an agent-based grounded search (SSE)
|
|
123
140
|
|
|
@@ -125,6 +142,9 @@ def sync(
|
|
|
125
142
|
x_unique_company_id (str | Unset): Tenant company identifier. Default: 'local'.
|
|
126
143
|
x_unique_user_id (str | Unset): Tenant user identifier. Default: 'local'.
|
|
127
144
|
x_unique_chat_id (str | Unset): Tenant chat or session identifier. Default: 'local'.
|
|
145
|
+
x_unique_entry_point (str | Unset): Service where the search entered the platform.
|
|
146
|
+
Default: 'unknown'.
|
|
147
|
+
x_unique_message_id (None | str | Unset): Message identifier, reserved for analytics.
|
|
128
148
|
body (BingAgentSearchRequest | VertexAiAgentSearchRequest):
|
|
129
149
|
|
|
130
150
|
Raises:
|
|
@@ -141,6 +161,8 @@ def sync(
|
|
|
141
161
|
x_unique_company_id=x_unique_company_id,
|
|
142
162
|
x_unique_user_id=x_unique_user_id,
|
|
143
163
|
x_unique_chat_id=x_unique_chat_id,
|
|
164
|
+
x_unique_entry_point=x_unique_entry_point,
|
|
165
|
+
x_unique_message_id=x_unique_message_id,
|
|
144
166
|
).parsed
|
|
145
167
|
|
|
146
168
|
|
|
@@ -151,6 +173,8 @@ async def asyncio_detailed(
|
|
|
151
173
|
x_unique_company_id: str | Unset = "local",
|
|
152
174
|
x_unique_user_id: str | Unset = "local",
|
|
153
175
|
x_unique_chat_id: str | Unset = "local",
|
|
176
|
+
x_unique_entry_point: str | Unset = "unknown",
|
|
177
|
+
x_unique_message_id: None | str | Unset = UNSET,
|
|
154
178
|
) -> Response[Any | HTTPValidationError]:
|
|
155
179
|
"""Stream an agent-based grounded search (SSE)
|
|
156
180
|
|
|
@@ -158,6 +182,9 @@ async def asyncio_detailed(
|
|
|
158
182
|
x_unique_company_id (str | Unset): Tenant company identifier. Default: 'local'.
|
|
159
183
|
x_unique_user_id (str | Unset): Tenant user identifier. Default: 'local'.
|
|
160
184
|
x_unique_chat_id (str | Unset): Tenant chat or session identifier. Default: 'local'.
|
|
185
|
+
x_unique_entry_point (str | Unset): Service where the search entered the platform.
|
|
186
|
+
Default: 'unknown'.
|
|
187
|
+
x_unique_message_id (None | str | Unset): Message identifier, reserved for analytics.
|
|
161
188
|
body (BingAgentSearchRequest | VertexAiAgentSearchRequest):
|
|
162
189
|
|
|
163
190
|
Raises:
|
|
@@ -173,6 +200,8 @@ async def asyncio_detailed(
|
|
|
173
200
|
x_unique_company_id=x_unique_company_id,
|
|
174
201
|
x_unique_user_id=x_unique_user_id,
|
|
175
202
|
x_unique_chat_id=x_unique_chat_id,
|
|
203
|
+
x_unique_entry_point=x_unique_entry_point,
|
|
204
|
+
x_unique_message_id=x_unique_message_id,
|
|
176
205
|
)
|
|
177
206
|
|
|
178
207
|
response = await client.get_async_httpx_client().request(**kwargs)
|
|
@@ -187,6 +216,8 @@ async def asyncio(
|
|
|
187
216
|
x_unique_company_id: str | Unset = "local",
|
|
188
217
|
x_unique_user_id: str | Unset = "local",
|
|
189
218
|
x_unique_chat_id: str | Unset = "local",
|
|
219
|
+
x_unique_entry_point: str | Unset = "unknown",
|
|
220
|
+
x_unique_message_id: None | str | Unset = UNSET,
|
|
190
221
|
) -> Any | HTTPValidationError | None:
|
|
191
222
|
"""Stream an agent-based grounded search (SSE)
|
|
192
223
|
|
|
@@ -194,6 +225,9 @@ async def asyncio(
|
|
|
194
225
|
x_unique_company_id (str | Unset): Tenant company identifier. Default: 'local'.
|
|
195
226
|
x_unique_user_id (str | Unset): Tenant user identifier. Default: 'local'.
|
|
196
227
|
x_unique_chat_id (str | Unset): Tenant chat or session identifier. Default: 'local'.
|
|
228
|
+
x_unique_entry_point (str | Unset): Service where the search entered the platform.
|
|
229
|
+
Default: 'unknown'.
|
|
230
|
+
x_unique_message_id (None | str | Unset): Message identifier, reserved for analytics.
|
|
197
231
|
body (BingAgentSearchRequest | VertexAiAgentSearchRequest):
|
|
198
232
|
|
|
199
233
|
Raises:
|
|
@@ -211,5 +245,7 @@ async def asyncio(
|
|
|
211
245
|
x_unique_company_id=x_unique_company_id,
|
|
212
246
|
x_unique_user_id=x_unique_user_id,
|
|
213
247
|
x_unique_chat_id=x_unique_chat_id,
|
|
248
|
+
x_unique_entry_point=x_unique_entry_point,
|
|
249
|
+
x_unique_message_id=x_unique_message_id,
|
|
214
250
|
)
|
|
215
251
|
).parsed
|
|
@@ -9,7 +9,7 @@ from ...models.agent_search_response import AgentSearchResponse
|
|
|
9
9
|
from ...models.bing_agent_search_request import BingAgentSearchRequest
|
|
10
10
|
from ...models.http_validation_error import HTTPValidationError
|
|
11
11
|
from ...models.vertex_ai_agent_search_request import VertexAiAgentSearchRequest
|
|
12
|
-
from ...types import Response, Unset
|
|
12
|
+
from ...types import UNSET, Response, Unset
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
def _get_kwargs(
|
|
@@ -18,6 +18,8 @@ def _get_kwargs(
|
|
|
18
18
|
x_unique_company_id: str | Unset = "local",
|
|
19
19
|
x_unique_user_id: str | Unset = "local",
|
|
20
20
|
x_unique_chat_id: str | Unset = "local",
|
|
21
|
+
x_unique_entry_point: str | Unset = "unknown",
|
|
22
|
+
x_unique_message_id: None | str | Unset = UNSET,
|
|
21
23
|
) -> dict[str, Any]:
|
|
22
24
|
headers: dict[str, Any] = {}
|
|
23
25
|
if not isinstance(x_unique_company_id, Unset):
|
|
@@ -29,6 +31,12 @@ def _get_kwargs(
|
|
|
29
31
|
if not isinstance(x_unique_chat_id, Unset):
|
|
30
32
|
headers["x-unique-chat-id"] = x_unique_chat_id
|
|
31
33
|
|
|
34
|
+
if not isinstance(x_unique_entry_point, Unset):
|
|
35
|
+
headers["x-unique-entry-point"] = x_unique_entry_point
|
|
36
|
+
|
|
37
|
+
if not isinstance(x_unique_message_id, Unset):
|
|
38
|
+
headers["x-unique-message-id"] = x_unique_message_id
|
|
39
|
+
|
|
32
40
|
_kwargs: dict[str, Any] = {
|
|
33
41
|
"method": "post",
|
|
34
42
|
"url": "/v1/agent-search",
|
|
@@ -82,6 +90,8 @@ def sync_detailed(
|
|
|
82
90
|
x_unique_company_id: str | Unset = "local",
|
|
83
91
|
x_unique_user_id: str | Unset = "local",
|
|
84
92
|
x_unique_chat_id: str | Unset = "local",
|
|
93
|
+
x_unique_entry_point: str | Unset = "unknown",
|
|
94
|
+
x_unique_message_id: None | str | Unset = UNSET,
|
|
85
95
|
) -> Response[AgentSearchResponse | HTTPValidationError]:
|
|
86
96
|
"""Run an agent-based grounded search
|
|
87
97
|
|
|
@@ -89,6 +99,9 @@ def sync_detailed(
|
|
|
89
99
|
x_unique_company_id (str | Unset): Tenant company identifier. Default: 'local'.
|
|
90
100
|
x_unique_user_id (str | Unset): Tenant user identifier. Default: 'local'.
|
|
91
101
|
x_unique_chat_id (str | Unset): Tenant chat or session identifier. Default: 'local'.
|
|
102
|
+
x_unique_entry_point (str | Unset): Service where the search entered the platform.
|
|
103
|
+
Default: 'unknown'.
|
|
104
|
+
x_unique_message_id (None | str | Unset): Message identifier, reserved for analytics.
|
|
92
105
|
body (BingAgentSearchRequest | VertexAiAgentSearchRequest):
|
|
93
106
|
|
|
94
107
|
Raises:
|
|
@@ -104,6 +117,8 @@ def sync_detailed(
|
|
|
104
117
|
x_unique_company_id=x_unique_company_id,
|
|
105
118
|
x_unique_user_id=x_unique_user_id,
|
|
106
119
|
x_unique_chat_id=x_unique_chat_id,
|
|
120
|
+
x_unique_entry_point=x_unique_entry_point,
|
|
121
|
+
x_unique_message_id=x_unique_message_id,
|
|
107
122
|
)
|
|
108
123
|
|
|
109
124
|
response = client.get_httpx_client().request(
|
|
@@ -120,6 +135,8 @@ def sync(
|
|
|
120
135
|
x_unique_company_id: str | Unset = "local",
|
|
121
136
|
x_unique_user_id: str | Unset = "local",
|
|
122
137
|
x_unique_chat_id: str | Unset = "local",
|
|
138
|
+
x_unique_entry_point: str | Unset = "unknown",
|
|
139
|
+
x_unique_message_id: None | str | Unset = UNSET,
|
|
123
140
|
) -> AgentSearchResponse | HTTPValidationError | None:
|
|
124
141
|
"""Run an agent-based grounded search
|
|
125
142
|
|
|
@@ -127,6 +144,9 @@ def sync(
|
|
|
127
144
|
x_unique_company_id (str | Unset): Tenant company identifier. Default: 'local'.
|
|
128
145
|
x_unique_user_id (str | Unset): Tenant user identifier. Default: 'local'.
|
|
129
146
|
x_unique_chat_id (str | Unset): Tenant chat or session identifier. Default: 'local'.
|
|
147
|
+
x_unique_entry_point (str | Unset): Service where the search entered the platform.
|
|
148
|
+
Default: 'unknown'.
|
|
149
|
+
x_unique_message_id (None | str | Unset): Message identifier, reserved for analytics.
|
|
130
150
|
body (BingAgentSearchRequest | VertexAiAgentSearchRequest):
|
|
131
151
|
|
|
132
152
|
Raises:
|
|
@@ -143,6 +163,8 @@ def sync(
|
|
|
143
163
|
x_unique_company_id=x_unique_company_id,
|
|
144
164
|
x_unique_user_id=x_unique_user_id,
|
|
145
165
|
x_unique_chat_id=x_unique_chat_id,
|
|
166
|
+
x_unique_entry_point=x_unique_entry_point,
|
|
167
|
+
x_unique_message_id=x_unique_message_id,
|
|
146
168
|
).parsed
|
|
147
169
|
|
|
148
170
|
|
|
@@ -153,6 +175,8 @@ async def asyncio_detailed(
|
|
|
153
175
|
x_unique_company_id: str | Unset = "local",
|
|
154
176
|
x_unique_user_id: str | Unset = "local",
|
|
155
177
|
x_unique_chat_id: str | Unset = "local",
|
|
178
|
+
x_unique_entry_point: str | Unset = "unknown",
|
|
179
|
+
x_unique_message_id: None | str | Unset = UNSET,
|
|
156
180
|
) -> Response[AgentSearchResponse | HTTPValidationError]:
|
|
157
181
|
"""Run an agent-based grounded search
|
|
158
182
|
|
|
@@ -160,6 +184,9 @@ async def asyncio_detailed(
|
|
|
160
184
|
x_unique_company_id (str | Unset): Tenant company identifier. Default: 'local'.
|
|
161
185
|
x_unique_user_id (str | Unset): Tenant user identifier. Default: 'local'.
|
|
162
186
|
x_unique_chat_id (str | Unset): Tenant chat or session identifier. Default: 'local'.
|
|
187
|
+
x_unique_entry_point (str | Unset): Service where the search entered the platform.
|
|
188
|
+
Default: 'unknown'.
|
|
189
|
+
x_unique_message_id (None | str | Unset): Message identifier, reserved for analytics.
|
|
163
190
|
body (BingAgentSearchRequest | VertexAiAgentSearchRequest):
|
|
164
191
|
|
|
165
192
|
Raises:
|
|
@@ -175,6 +202,8 @@ async def asyncio_detailed(
|
|
|
175
202
|
x_unique_company_id=x_unique_company_id,
|
|
176
203
|
x_unique_user_id=x_unique_user_id,
|
|
177
204
|
x_unique_chat_id=x_unique_chat_id,
|
|
205
|
+
x_unique_entry_point=x_unique_entry_point,
|
|
206
|
+
x_unique_message_id=x_unique_message_id,
|
|
178
207
|
)
|
|
179
208
|
|
|
180
209
|
response = await client.get_async_httpx_client().request(**kwargs)
|
|
@@ -189,6 +218,8 @@ async def asyncio(
|
|
|
189
218
|
x_unique_company_id: str | Unset = "local",
|
|
190
219
|
x_unique_user_id: str | Unset = "local",
|
|
191
220
|
x_unique_chat_id: str | Unset = "local",
|
|
221
|
+
x_unique_entry_point: str | Unset = "unknown",
|
|
222
|
+
x_unique_message_id: None | str | Unset = UNSET,
|
|
192
223
|
) -> AgentSearchResponse | HTTPValidationError | None:
|
|
193
224
|
"""Run an agent-based grounded search
|
|
194
225
|
|
|
@@ -196,6 +227,9 @@ async def asyncio(
|
|
|
196
227
|
x_unique_company_id (str | Unset): Tenant company identifier. Default: 'local'.
|
|
197
228
|
x_unique_user_id (str | Unset): Tenant user identifier. Default: 'local'.
|
|
198
229
|
x_unique_chat_id (str | Unset): Tenant chat or session identifier. Default: 'local'.
|
|
230
|
+
x_unique_entry_point (str | Unset): Service where the search entered the platform.
|
|
231
|
+
Default: 'unknown'.
|
|
232
|
+
x_unique_message_id (None | str | Unset): Message identifier, reserved for analytics.
|
|
199
233
|
body (BingAgentSearchRequest | VertexAiAgentSearchRequest):
|
|
200
234
|
|
|
201
235
|
Raises:
|
|
@@ -213,5 +247,7 @@ async def asyncio(
|
|
|
213
247
|
x_unique_company_id=x_unique_company_id,
|
|
214
248
|
x_unique_user_id=x_unique_user_id,
|
|
215
249
|
x_unique_chat_id=x_unique_chat_id,
|
|
250
|
+
x_unique_entry_point=x_unique_entry_point,
|
|
251
|
+
x_unique_message_id=x_unique_message_id,
|
|
216
252
|
)
|
|
217
253
|
).parsed
|
|
@@ -7,7 +7,7 @@ from ... import errors
|
|
|
7
7
|
from ...client import AuthenticatedClient, Client
|
|
8
8
|
from ...models.http_validation_error import HTTPValidationError
|
|
9
9
|
from ...models.providers_list_response import ProvidersListResponse
|
|
10
|
-
from ...types import Response, Unset
|
|
10
|
+
from ...types import UNSET, Response, Unset
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
def _get_kwargs(
|
|
@@ -15,6 +15,8 @@ def _get_kwargs(
|
|
|
15
15
|
x_unique_company_id: str | Unset = "local",
|
|
16
16
|
x_unique_user_id: str | Unset = "local",
|
|
17
17
|
x_unique_chat_id: str | Unset = "local",
|
|
18
|
+
x_unique_entry_point: str | Unset = "unknown",
|
|
19
|
+
x_unique_message_id: None | str | Unset = UNSET,
|
|
18
20
|
) -> dict[str, Any]:
|
|
19
21
|
headers: dict[str, Any] = {}
|
|
20
22
|
if not isinstance(x_unique_company_id, Unset):
|
|
@@ -26,6 +28,12 @@ def _get_kwargs(
|
|
|
26
28
|
if not isinstance(x_unique_chat_id, Unset):
|
|
27
29
|
headers["x-unique-chat-id"] = x_unique_chat_id
|
|
28
30
|
|
|
31
|
+
if not isinstance(x_unique_entry_point, Unset):
|
|
32
|
+
headers["x-unique-entry-point"] = x_unique_entry_point
|
|
33
|
+
|
|
34
|
+
if not isinstance(x_unique_message_id, Unset):
|
|
35
|
+
headers["x-unique-message-id"] = x_unique_message_id
|
|
36
|
+
|
|
29
37
|
_kwargs: dict[str, Any] = {
|
|
30
38
|
"method": "get",
|
|
31
39
|
"url": "/v1/configuration/providers",
|
|
@@ -71,6 +79,8 @@ def sync_detailed(
|
|
|
71
79
|
x_unique_company_id: str | Unset = "local",
|
|
72
80
|
x_unique_user_id: str | Unset = "local",
|
|
73
81
|
x_unique_chat_id: str | Unset = "local",
|
|
82
|
+
x_unique_entry_point: str | Unset = "unknown",
|
|
83
|
+
x_unique_message_id: None | str | Unset = UNSET,
|
|
74
84
|
) -> Response[HTTPValidationError | ProvidersListResponse]:
|
|
75
85
|
"""List registered search engines and crawlers
|
|
76
86
|
|
|
@@ -78,6 +88,9 @@ def sync_detailed(
|
|
|
78
88
|
x_unique_company_id (str | Unset): Tenant company identifier. Default: 'local'.
|
|
79
89
|
x_unique_user_id (str | Unset): Tenant user identifier. Default: 'local'.
|
|
80
90
|
x_unique_chat_id (str | Unset): Tenant chat or session identifier. Default: 'local'.
|
|
91
|
+
x_unique_entry_point (str | Unset): Service where the search entered the platform.
|
|
92
|
+
Default: 'unknown'.
|
|
93
|
+
x_unique_message_id (None | str | Unset): Message identifier, reserved for analytics.
|
|
81
94
|
|
|
82
95
|
Raises:
|
|
83
96
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
@@ -91,6 +104,8 @@ def sync_detailed(
|
|
|
91
104
|
x_unique_company_id=x_unique_company_id,
|
|
92
105
|
x_unique_user_id=x_unique_user_id,
|
|
93
106
|
x_unique_chat_id=x_unique_chat_id,
|
|
107
|
+
x_unique_entry_point=x_unique_entry_point,
|
|
108
|
+
x_unique_message_id=x_unique_message_id,
|
|
94
109
|
)
|
|
95
110
|
|
|
96
111
|
response = client.get_httpx_client().request(
|
|
@@ -106,6 +121,8 @@ def sync(
|
|
|
106
121
|
x_unique_company_id: str | Unset = "local",
|
|
107
122
|
x_unique_user_id: str | Unset = "local",
|
|
108
123
|
x_unique_chat_id: str | Unset = "local",
|
|
124
|
+
x_unique_entry_point: str | Unset = "unknown",
|
|
125
|
+
x_unique_message_id: None | str | Unset = UNSET,
|
|
109
126
|
) -> HTTPValidationError | ProvidersListResponse | None:
|
|
110
127
|
"""List registered search engines and crawlers
|
|
111
128
|
|
|
@@ -113,6 +130,9 @@ def sync(
|
|
|
113
130
|
x_unique_company_id (str | Unset): Tenant company identifier. Default: 'local'.
|
|
114
131
|
x_unique_user_id (str | Unset): Tenant user identifier. Default: 'local'.
|
|
115
132
|
x_unique_chat_id (str | Unset): Tenant chat or session identifier. Default: 'local'.
|
|
133
|
+
x_unique_entry_point (str | Unset): Service where the search entered the platform.
|
|
134
|
+
Default: 'unknown'.
|
|
135
|
+
x_unique_message_id (None | str | Unset): Message identifier, reserved for analytics.
|
|
116
136
|
|
|
117
137
|
Raises:
|
|
118
138
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
@@ -127,6 +147,8 @@ def sync(
|
|
|
127
147
|
x_unique_company_id=x_unique_company_id,
|
|
128
148
|
x_unique_user_id=x_unique_user_id,
|
|
129
149
|
x_unique_chat_id=x_unique_chat_id,
|
|
150
|
+
x_unique_entry_point=x_unique_entry_point,
|
|
151
|
+
x_unique_message_id=x_unique_message_id,
|
|
130
152
|
).parsed
|
|
131
153
|
|
|
132
154
|
|
|
@@ -136,6 +158,8 @@ async def asyncio_detailed(
|
|
|
136
158
|
x_unique_company_id: str | Unset = "local",
|
|
137
159
|
x_unique_user_id: str | Unset = "local",
|
|
138
160
|
x_unique_chat_id: str | Unset = "local",
|
|
161
|
+
x_unique_entry_point: str | Unset = "unknown",
|
|
162
|
+
x_unique_message_id: None | str | Unset = UNSET,
|
|
139
163
|
) -> Response[HTTPValidationError | ProvidersListResponse]:
|
|
140
164
|
"""List registered search engines and crawlers
|
|
141
165
|
|
|
@@ -143,6 +167,9 @@ async def asyncio_detailed(
|
|
|
143
167
|
x_unique_company_id (str | Unset): Tenant company identifier. Default: 'local'.
|
|
144
168
|
x_unique_user_id (str | Unset): Tenant user identifier. Default: 'local'.
|
|
145
169
|
x_unique_chat_id (str | Unset): Tenant chat or session identifier. Default: 'local'.
|
|
170
|
+
x_unique_entry_point (str | Unset): Service where the search entered the platform.
|
|
171
|
+
Default: 'unknown'.
|
|
172
|
+
x_unique_message_id (None | str | Unset): Message identifier, reserved for analytics.
|
|
146
173
|
|
|
147
174
|
Raises:
|
|
148
175
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
@@ -156,6 +183,8 @@ async def asyncio_detailed(
|
|
|
156
183
|
x_unique_company_id=x_unique_company_id,
|
|
157
184
|
x_unique_user_id=x_unique_user_id,
|
|
158
185
|
x_unique_chat_id=x_unique_chat_id,
|
|
186
|
+
x_unique_entry_point=x_unique_entry_point,
|
|
187
|
+
x_unique_message_id=x_unique_message_id,
|
|
159
188
|
)
|
|
160
189
|
|
|
161
190
|
response = await client.get_async_httpx_client().request(**kwargs)
|
|
@@ -169,6 +198,8 @@ async def asyncio(
|
|
|
169
198
|
x_unique_company_id: str | Unset = "local",
|
|
170
199
|
x_unique_user_id: str | Unset = "local",
|
|
171
200
|
x_unique_chat_id: str | Unset = "local",
|
|
201
|
+
x_unique_entry_point: str | Unset = "unknown",
|
|
202
|
+
x_unique_message_id: None | str | Unset = UNSET,
|
|
172
203
|
) -> HTTPValidationError | ProvidersListResponse | None:
|
|
173
204
|
"""List registered search engines and crawlers
|
|
174
205
|
|
|
@@ -176,6 +207,9 @@ async def asyncio(
|
|
|
176
207
|
x_unique_company_id (str | Unset): Tenant company identifier. Default: 'local'.
|
|
177
208
|
x_unique_user_id (str | Unset): Tenant user identifier. Default: 'local'.
|
|
178
209
|
x_unique_chat_id (str | Unset): Tenant chat or session identifier. Default: 'local'.
|
|
210
|
+
x_unique_entry_point (str | Unset): Service where the search entered the platform.
|
|
211
|
+
Default: 'unknown'.
|
|
212
|
+
x_unique_message_id (None | str | Unset): Message identifier, reserved for analytics.
|
|
179
213
|
|
|
180
214
|
Raises:
|
|
181
215
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
@@ -191,5 +225,7 @@ async def asyncio(
|
|
|
191
225
|
x_unique_company_id=x_unique_company_id,
|
|
192
226
|
x_unique_user_id=x_unique_user_id,
|
|
193
227
|
x_unique_chat_id=x_unique_chat_id,
|
|
228
|
+
x_unique_entry_point=x_unique_entry_point,
|
|
229
|
+
x_unique_message_id=x_unique_message_id,
|
|
194
230
|
)
|
|
195
231
|
).parsed
|
|
@@ -11,7 +11,7 @@ from ...models.firecrawl_crawl_request import FirecrawlCrawlRequest
|
|
|
11
11
|
from ...models.http_validation_error import HTTPValidationError
|
|
12
12
|
from ...models.jina_crawl_request import JinaCrawlRequest
|
|
13
13
|
from ...models.tavily_crawl_request import TavilyCrawlRequest
|
|
14
|
-
from ...types import Response, Unset
|
|
14
|
+
from ...types import UNSET, Response, Unset
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
def _get_kwargs(
|
|
@@ -23,6 +23,8 @@ def _get_kwargs(
|
|
|
23
23
|
x_unique_company_id: str | Unset = "local",
|
|
24
24
|
x_unique_user_id: str | Unset = "local",
|
|
25
25
|
x_unique_chat_id: str | Unset = "local",
|
|
26
|
+
x_unique_entry_point: str | Unset = "unknown",
|
|
27
|
+
x_unique_message_id: None | str | Unset = UNSET,
|
|
26
28
|
) -> dict[str, Any]:
|
|
27
29
|
headers: dict[str, Any] = {}
|
|
28
30
|
if not isinstance(x_unique_company_id, Unset):
|
|
@@ -34,6 +36,12 @@ def _get_kwargs(
|
|
|
34
36
|
if not isinstance(x_unique_chat_id, Unset):
|
|
35
37
|
headers["x-unique-chat-id"] = x_unique_chat_id
|
|
36
38
|
|
|
39
|
+
if not isinstance(x_unique_entry_point, Unset):
|
|
40
|
+
headers["x-unique-entry-point"] = x_unique_entry_point
|
|
41
|
+
|
|
42
|
+
if not isinstance(x_unique_message_id, Unset):
|
|
43
|
+
headers["x-unique-message-id"] = x_unique_message_id
|
|
44
|
+
|
|
37
45
|
_kwargs: dict[str, Any] = {
|
|
38
46
|
"method": "post",
|
|
39
47
|
"url": "/v1/crawl",
|
|
@@ -94,6 +102,8 @@ def sync_detailed(
|
|
|
94
102
|
x_unique_company_id: str | Unset = "local",
|
|
95
103
|
x_unique_user_id: str | Unset = "local",
|
|
96
104
|
x_unique_chat_id: str | Unset = "local",
|
|
105
|
+
x_unique_entry_point: str | Unset = "unknown",
|
|
106
|
+
x_unique_message_id: None | str | Unset = UNSET,
|
|
97
107
|
) -> Response[CrawlResponse | HTTPValidationError]:
|
|
98
108
|
"""Crawl URLs with a configured crawler
|
|
99
109
|
|
|
@@ -101,6 +111,9 @@ def sync_detailed(
|
|
|
101
111
|
x_unique_company_id (str | Unset): Tenant company identifier. Default: 'local'.
|
|
102
112
|
x_unique_user_id (str | Unset): Tenant user identifier. Default: 'local'.
|
|
103
113
|
x_unique_chat_id (str | Unset): Tenant chat or session identifier. Default: 'local'.
|
|
114
|
+
x_unique_entry_point (str | Unset): Service where the search entered the platform.
|
|
115
|
+
Default: 'unknown'.
|
|
116
|
+
x_unique_message_id (None | str | Unset): Message identifier, reserved for analytics.
|
|
104
117
|
body (BasicCrawlRequest | FirecrawlCrawlRequest | JinaCrawlRequest | TavilyCrawlRequest):
|
|
105
118
|
|
|
106
119
|
Raises:
|
|
@@ -116,6 +129,8 @@ def sync_detailed(
|
|
|
116
129
|
x_unique_company_id=x_unique_company_id,
|
|
117
130
|
x_unique_user_id=x_unique_user_id,
|
|
118
131
|
x_unique_chat_id=x_unique_chat_id,
|
|
132
|
+
x_unique_entry_point=x_unique_entry_point,
|
|
133
|
+
x_unique_message_id=x_unique_message_id,
|
|
119
134
|
)
|
|
120
135
|
|
|
121
136
|
response = client.get_httpx_client().request(
|
|
@@ -135,6 +150,8 @@ def sync(
|
|
|
135
150
|
x_unique_company_id: str | Unset = "local",
|
|
136
151
|
x_unique_user_id: str | Unset = "local",
|
|
137
152
|
x_unique_chat_id: str | Unset = "local",
|
|
153
|
+
x_unique_entry_point: str | Unset = "unknown",
|
|
154
|
+
x_unique_message_id: None | str | Unset = UNSET,
|
|
138
155
|
) -> CrawlResponse | HTTPValidationError | None:
|
|
139
156
|
"""Crawl URLs with a configured crawler
|
|
140
157
|
|
|
@@ -142,6 +159,9 @@ def sync(
|
|
|
142
159
|
x_unique_company_id (str | Unset): Tenant company identifier. Default: 'local'.
|
|
143
160
|
x_unique_user_id (str | Unset): Tenant user identifier. Default: 'local'.
|
|
144
161
|
x_unique_chat_id (str | Unset): Tenant chat or session identifier. Default: 'local'.
|
|
162
|
+
x_unique_entry_point (str | Unset): Service where the search entered the platform.
|
|
163
|
+
Default: 'unknown'.
|
|
164
|
+
x_unique_message_id (None | str | Unset): Message identifier, reserved for analytics.
|
|
145
165
|
body (BasicCrawlRequest | FirecrawlCrawlRequest | JinaCrawlRequest | TavilyCrawlRequest):
|
|
146
166
|
|
|
147
167
|
Raises:
|
|
@@ -158,6 +178,8 @@ def sync(
|
|
|
158
178
|
x_unique_company_id=x_unique_company_id,
|
|
159
179
|
x_unique_user_id=x_unique_user_id,
|
|
160
180
|
x_unique_chat_id=x_unique_chat_id,
|
|
181
|
+
x_unique_entry_point=x_unique_entry_point,
|
|
182
|
+
x_unique_message_id=x_unique_message_id,
|
|
161
183
|
).parsed
|
|
162
184
|
|
|
163
185
|
|
|
@@ -171,6 +193,8 @@ async def asyncio_detailed(
|
|
|
171
193
|
x_unique_company_id: str | Unset = "local",
|
|
172
194
|
x_unique_user_id: str | Unset = "local",
|
|
173
195
|
x_unique_chat_id: str | Unset = "local",
|
|
196
|
+
x_unique_entry_point: str | Unset = "unknown",
|
|
197
|
+
x_unique_message_id: None | str | Unset = UNSET,
|
|
174
198
|
) -> Response[CrawlResponse | HTTPValidationError]:
|
|
175
199
|
"""Crawl URLs with a configured crawler
|
|
176
200
|
|
|
@@ -178,6 +202,9 @@ async def asyncio_detailed(
|
|
|
178
202
|
x_unique_company_id (str | Unset): Tenant company identifier. Default: 'local'.
|
|
179
203
|
x_unique_user_id (str | Unset): Tenant user identifier. Default: 'local'.
|
|
180
204
|
x_unique_chat_id (str | Unset): Tenant chat or session identifier. Default: 'local'.
|
|
205
|
+
x_unique_entry_point (str | Unset): Service where the search entered the platform.
|
|
206
|
+
Default: 'unknown'.
|
|
207
|
+
x_unique_message_id (None | str | Unset): Message identifier, reserved for analytics.
|
|
181
208
|
body (BasicCrawlRequest | FirecrawlCrawlRequest | JinaCrawlRequest | TavilyCrawlRequest):
|
|
182
209
|
|
|
183
210
|
Raises:
|
|
@@ -193,6 +220,8 @@ async def asyncio_detailed(
|
|
|
193
220
|
x_unique_company_id=x_unique_company_id,
|
|
194
221
|
x_unique_user_id=x_unique_user_id,
|
|
195
222
|
x_unique_chat_id=x_unique_chat_id,
|
|
223
|
+
x_unique_entry_point=x_unique_entry_point,
|
|
224
|
+
x_unique_message_id=x_unique_message_id,
|
|
196
225
|
)
|
|
197
226
|
|
|
198
227
|
response = await client.get_async_httpx_client().request(**kwargs)
|
|
@@ -210,6 +239,8 @@ async def asyncio(
|
|
|
210
239
|
x_unique_company_id: str | Unset = "local",
|
|
211
240
|
x_unique_user_id: str | Unset = "local",
|
|
212
241
|
x_unique_chat_id: str | Unset = "local",
|
|
242
|
+
x_unique_entry_point: str | Unset = "unknown",
|
|
243
|
+
x_unique_message_id: None | str | Unset = UNSET,
|
|
213
244
|
) -> CrawlResponse | HTTPValidationError | None:
|
|
214
245
|
"""Crawl URLs with a configured crawler
|
|
215
246
|
|
|
@@ -217,6 +248,9 @@ async def asyncio(
|
|
|
217
248
|
x_unique_company_id (str | Unset): Tenant company identifier. Default: 'local'.
|
|
218
249
|
x_unique_user_id (str | Unset): Tenant user identifier. Default: 'local'.
|
|
219
250
|
x_unique_chat_id (str | Unset): Tenant chat or session identifier. Default: 'local'.
|
|
251
|
+
x_unique_entry_point (str | Unset): Service where the search entered the platform.
|
|
252
|
+
Default: 'unknown'.
|
|
253
|
+
x_unique_message_id (None | str | Unset): Message identifier, reserved for analytics.
|
|
220
254
|
body (BasicCrawlRequest | FirecrawlCrawlRequest | JinaCrawlRequest | TavilyCrawlRequest):
|
|
221
255
|
|
|
222
256
|
Raises:
|
|
@@ -234,5 +268,7 @@ async def asyncio(
|
|
|
234
268
|
x_unique_company_id=x_unique_company_id,
|
|
235
269
|
x_unique_user_id=x_unique_user_id,
|
|
236
270
|
x_unique_chat_id=x_unique_chat_id,
|
|
271
|
+
x_unique_entry_point=x_unique_entry_point,
|
|
272
|
+
x_unique_message_id=x_unique_message_id,
|
|
237
273
|
)
|
|
238
274
|
).parsed
|
|
@@ -11,7 +11,7 @@ from ...models.google_search_request import GoogleSearchRequest
|
|
|
11
11
|
from ...models.http_validation_error import HTTPValidationError
|
|
12
12
|
from ...models.perplexity_search_request import PerplexitySearchRequest
|
|
13
13
|
from ...models.search_response import SearchResponse
|
|
14
|
-
from ...types import Response, Unset
|
|
14
|
+
from ...types import UNSET, Response, Unset
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
def _get_kwargs(
|
|
@@ -23,6 +23,8 @@ def _get_kwargs(
|
|
|
23
23
|
x_unique_company_id: str | Unset = "local",
|
|
24
24
|
x_unique_user_id: str | Unset = "local",
|
|
25
25
|
x_unique_chat_id: str | Unset = "local",
|
|
26
|
+
x_unique_entry_point: str | Unset = "unknown",
|
|
27
|
+
x_unique_message_id: None | str | Unset = UNSET,
|
|
26
28
|
) -> dict[str, Any]:
|
|
27
29
|
headers: dict[str, Any] = {}
|
|
28
30
|
if not isinstance(x_unique_company_id, Unset):
|
|
@@ -34,6 +36,12 @@ def _get_kwargs(
|
|
|
34
36
|
if not isinstance(x_unique_chat_id, Unset):
|
|
35
37
|
headers["x-unique-chat-id"] = x_unique_chat_id
|
|
36
38
|
|
|
39
|
+
if not isinstance(x_unique_entry_point, Unset):
|
|
40
|
+
headers["x-unique-entry-point"] = x_unique_entry_point
|
|
41
|
+
|
|
42
|
+
if not isinstance(x_unique_message_id, Unset):
|
|
43
|
+
headers["x-unique-message-id"] = x_unique_message_id
|
|
44
|
+
|
|
37
45
|
_kwargs: dict[str, Any] = {
|
|
38
46
|
"method": "post",
|
|
39
47
|
"url": "/v1/search",
|
|
@@ -94,6 +102,8 @@ def sync_detailed(
|
|
|
94
102
|
x_unique_company_id: str | Unset = "local",
|
|
95
103
|
x_unique_user_id: str | Unset = "local",
|
|
96
104
|
x_unique_chat_id: str | Unset = "local",
|
|
105
|
+
x_unique_entry_point: str | Unset = "unknown",
|
|
106
|
+
x_unique_message_id: None | str | Unset = UNSET,
|
|
97
107
|
) -> Response[HTTPValidationError | SearchResponse]:
|
|
98
108
|
"""Run a search engine with a typed call payload
|
|
99
109
|
|
|
@@ -101,6 +111,9 @@ def sync_detailed(
|
|
|
101
111
|
x_unique_company_id (str | Unset): Tenant company identifier. Default: 'local'.
|
|
102
112
|
x_unique_user_id (str | Unset): Tenant user identifier. Default: 'local'.
|
|
103
113
|
x_unique_chat_id (str | Unset): Tenant chat or session identifier. Default: 'local'.
|
|
114
|
+
x_unique_entry_point (str | Unset): Service where the search entered the platform.
|
|
115
|
+
Default: 'unknown'.
|
|
116
|
+
x_unique_message_id (None | str | Unset): Message identifier, reserved for analytics.
|
|
104
117
|
body (BraveSearchRequest | CustomApiSearchRequest | GoogleSearchRequest |
|
|
105
118
|
PerplexitySearchRequest):
|
|
106
119
|
|
|
@@ -117,6 +130,8 @@ def sync_detailed(
|
|
|
117
130
|
x_unique_company_id=x_unique_company_id,
|
|
118
131
|
x_unique_user_id=x_unique_user_id,
|
|
119
132
|
x_unique_chat_id=x_unique_chat_id,
|
|
133
|
+
x_unique_entry_point=x_unique_entry_point,
|
|
134
|
+
x_unique_message_id=x_unique_message_id,
|
|
120
135
|
)
|
|
121
136
|
|
|
122
137
|
response = client.get_httpx_client().request(
|
|
@@ -136,6 +151,8 @@ def sync(
|
|
|
136
151
|
x_unique_company_id: str | Unset = "local",
|
|
137
152
|
x_unique_user_id: str | Unset = "local",
|
|
138
153
|
x_unique_chat_id: str | Unset = "local",
|
|
154
|
+
x_unique_entry_point: str | Unset = "unknown",
|
|
155
|
+
x_unique_message_id: None | str | Unset = UNSET,
|
|
139
156
|
) -> HTTPValidationError | SearchResponse | None:
|
|
140
157
|
"""Run a search engine with a typed call payload
|
|
141
158
|
|
|
@@ -143,6 +160,9 @@ def sync(
|
|
|
143
160
|
x_unique_company_id (str | Unset): Tenant company identifier. Default: 'local'.
|
|
144
161
|
x_unique_user_id (str | Unset): Tenant user identifier. Default: 'local'.
|
|
145
162
|
x_unique_chat_id (str | Unset): Tenant chat or session identifier. Default: 'local'.
|
|
163
|
+
x_unique_entry_point (str | Unset): Service where the search entered the platform.
|
|
164
|
+
Default: 'unknown'.
|
|
165
|
+
x_unique_message_id (None | str | Unset): Message identifier, reserved for analytics.
|
|
146
166
|
body (BraveSearchRequest | CustomApiSearchRequest | GoogleSearchRequest |
|
|
147
167
|
PerplexitySearchRequest):
|
|
148
168
|
|
|
@@ -160,6 +180,8 @@ def sync(
|
|
|
160
180
|
x_unique_company_id=x_unique_company_id,
|
|
161
181
|
x_unique_user_id=x_unique_user_id,
|
|
162
182
|
x_unique_chat_id=x_unique_chat_id,
|
|
183
|
+
x_unique_entry_point=x_unique_entry_point,
|
|
184
|
+
x_unique_message_id=x_unique_message_id,
|
|
163
185
|
).parsed
|
|
164
186
|
|
|
165
187
|
|
|
@@ -173,6 +195,8 @@ async def asyncio_detailed(
|
|
|
173
195
|
x_unique_company_id: str | Unset = "local",
|
|
174
196
|
x_unique_user_id: str | Unset = "local",
|
|
175
197
|
x_unique_chat_id: str | Unset = "local",
|
|
198
|
+
x_unique_entry_point: str | Unset = "unknown",
|
|
199
|
+
x_unique_message_id: None | str | Unset = UNSET,
|
|
176
200
|
) -> Response[HTTPValidationError | SearchResponse]:
|
|
177
201
|
"""Run a search engine with a typed call payload
|
|
178
202
|
|
|
@@ -180,6 +204,9 @@ async def asyncio_detailed(
|
|
|
180
204
|
x_unique_company_id (str | Unset): Tenant company identifier. Default: 'local'.
|
|
181
205
|
x_unique_user_id (str | Unset): Tenant user identifier. Default: 'local'.
|
|
182
206
|
x_unique_chat_id (str | Unset): Tenant chat or session identifier. Default: 'local'.
|
|
207
|
+
x_unique_entry_point (str | Unset): Service where the search entered the platform.
|
|
208
|
+
Default: 'unknown'.
|
|
209
|
+
x_unique_message_id (None | str | Unset): Message identifier, reserved for analytics.
|
|
183
210
|
body (BraveSearchRequest | CustomApiSearchRequest | GoogleSearchRequest |
|
|
184
211
|
PerplexitySearchRequest):
|
|
185
212
|
|
|
@@ -196,6 +223,8 @@ async def asyncio_detailed(
|
|
|
196
223
|
x_unique_company_id=x_unique_company_id,
|
|
197
224
|
x_unique_user_id=x_unique_user_id,
|
|
198
225
|
x_unique_chat_id=x_unique_chat_id,
|
|
226
|
+
x_unique_entry_point=x_unique_entry_point,
|
|
227
|
+
x_unique_message_id=x_unique_message_id,
|
|
199
228
|
)
|
|
200
229
|
|
|
201
230
|
response = await client.get_async_httpx_client().request(**kwargs)
|
|
@@ -213,6 +242,8 @@ async def asyncio(
|
|
|
213
242
|
x_unique_company_id: str | Unset = "local",
|
|
214
243
|
x_unique_user_id: str | Unset = "local",
|
|
215
244
|
x_unique_chat_id: str | Unset = "local",
|
|
245
|
+
x_unique_entry_point: str | Unset = "unknown",
|
|
246
|
+
x_unique_message_id: None | str | Unset = UNSET,
|
|
216
247
|
) -> HTTPValidationError | SearchResponse | None:
|
|
217
248
|
"""Run a search engine with a typed call payload
|
|
218
249
|
|
|
@@ -220,6 +251,9 @@ async def asyncio(
|
|
|
220
251
|
x_unique_company_id (str | Unset): Tenant company identifier. Default: 'local'.
|
|
221
252
|
x_unique_user_id (str | Unset): Tenant user identifier. Default: 'local'.
|
|
222
253
|
x_unique_chat_id (str | Unset): Tenant chat or session identifier. Default: 'local'.
|
|
254
|
+
x_unique_entry_point (str | Unset): Service where the search entered the platform.
|
|
255
|
+
Default: 'unknown'.
|
|
256
|
+
x_unique_message_id (None | str | Unset): Message identifier, reserved for analytics.
|
|
223
257
|
body (BraveSearchRequest | CustomApiSearchRequest | GoogleSearchRequest |
|
|
224
258
|
PerplexitySearchRequest):
|
|
225
259
|
|
|
@@ -238,5 +272,7 @@ async def asyncio(
|
|
|
238
272
|
x_unique_company_id=x_unique_company_id,
|
|
239
273
|
x_unique_user_id=x_unique_user_id,
|
|
240
274
|
x_unique_chat_id=x_unique_chat_id,
|
|
275
|
+
x_unique_entry_point=x_unique_entry_point,
|
|
276
|
+
x_unique_message_id=x_unique_message_id,
|
|
241
277
|
)
|
|
242
278
|
).parsed
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"""Contains all the data models used in inputs/outputs"""
|
|
2
2
|
|
|
3
3
|
from .agent_search_response import AgentSearchResponse
|
|
4
|
+
from .answer_span_citation import AnswerSpanCitation
|
|
4
5
|
from .basic_crawl_request import BasicCrawlRequest
|
|
5
6
|
from .bing_agent_search_request import BingAgentSearchRequest
|
|
6
7
|
from .bing_agent_search_request_freshness_type_0 import (
|
|
@@ -60,6 +61,7 @@ from .web_search_result import WebSearchResult
|
|
|
60
61
|
|
|
61
62
|
__all__ = (
|
|
62
63
|
"AgentSearchResponse",
|
|
64
|
+
"AnswerSpanCitation",
|
|
63
65
|
"BasicCrawlRequest",
|
|
64
66
|
"BingAgentSearchRequest",
|
|
65
67
|
"BingAgentSearchRequestFreshnessType0",
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
3
|
from collections.abc import Mapping
|
|
4
|
-
from typing import Any, TypeVar
|
|
4
|
+
from typing import TYPE_CHECKING, Any, TypeVar
|
|
5
5
|
|
|
6
6
|
from attrs import define as _attrs_define
|
|
7
7
|
from attrs import field as _attrs_field
|
|
8
8
|
|
|
9
9
|
from ..types import UNSET, Unset
|
|
10
10
|
|
|
11
|
+
if TYPE_CHECKING:
|
|
12
|
+
from ..models.answer_span_citation import AnswerSpanCitation
|
|
13
|
+
|
|
14
|
+
|
|
11
15
|
T = TypeVar("T", bound="AgentSearchResponse")
|
|
12
16
|
|
|
13
17
|
|
|
@@ -15,19 +19,23 @@ T = TypeVar("T", bound="AgentSearchResponse")
|
|
|
15
19
|
class AgentSearchResponse:
|
|
16
20
|
"""Result of an agent-based (grounded) search.
|
|
17
21
|
|
|
18
|
-
Thin egress contract: opaque ``answer`` text from the provider
|
|
19
|
-
|
|
22
|
+
Thin egress contract: opaque ``answer`` text from the provider, the
|
|
23
|
+
citations the provider attached to it, and ``raw`` for debugging. Consumers
|
|
24
|
+
interpret ``answer`` (JSON parsing, mapping citations, etc.).
|
|
20
25
|
|
|
21
26
|
Attributes:
|
|
22
27
|
engine (str):
|
|
23
28
|
query (str):
|
|
24
29
|
answer (str | Unset): Agent response text as returned by the provider (opaque to the proxy) Default: ''.
|
|
30
|
+
citations (list[AnswerSpanCitation] | Unset): Sources cited in the answer. Only Grounding with Bing Search
|
|
31
|
+
reports citations; other engines return an empty list.
|
|
25
32
|
raw (Any | Unset): Opaque provider payload
|
|
26
33
|
"""
|
|
27
34
|
|
|
28
35
|
engine: str
|
|
29
36
|
query: str
|
|
30
37
|
answer: str | Unset = ""
|
|
38
|
+
citations: list[AnswerSpanCitation] | Unset = UNSET
|
|
31
39
|
raw: Any | Unset = UNSET
|
|
32
40
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
33
41
|
|
|
@@ -38,6 +46,13 @@ class AgentSearchResponse:
|
|
|
38
46
|
|
|
39
47
|
answer = self.answer
|
|
40
48
|
|
|
49
|
+
citations: list[dict[str, Any]] | Unset = UNSET
|
|
50
|
+
if not isinstance(self.citations, Unset):
|
|
51
|
+
citations = []
|
|
52
|
+
for citations_item_data in self.citations:
|
|
53
|
+
citations_item = citations_item_data.to_dict()
|
|
54
|
+
citations.append(citations_item)
|
|
55
|
+
|
|
41
56
|
raw = self.raw
|
|
42
57
|
|
|
43
58
|
field_dict: dict[str, Any] = {}
|
|
@@ -50,6 +65,8 @@ class AgentSearchResponse:
|
|
|
50
65
|
)
|
|
51
66
|
if answer is not UNSET:
|
|
52
67
|
field_dict["answer"] = answer
|
|
68
|
+
if citations is not UNSET:
|
|
69
|
+
field_dict["citations"] = citations
|
|
53
70
|
if raw is not UNSET:
|
|
54
71
|
field_dict["raw"] = raw
|
|
55
72
|
|
|
@@ -57,6 +74,8 @@ class AgentSearchResponse:
|
|
|
57
74
|
|
|
58
75
|
@classmethod
|
|
59
76
|
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
77
|
+
from ..models.answer_span_citation import AnswerSpanCitation
|
|
78
|
+
|
|
60
79
|
d = dict(src_dict)
|
|
61
80
|
engine = d.pop("engine")
|
|
62
81
|
|
|
@@ -64,12 +83,22 @@ class AgentSearchResponse:
|
|
|
64
83
|
|
|
65
84
|
answer = d.pop("answer", UNSET)
|
|
66
85
|
|
|
86
|
+
_citations = d.pop("citations", UNSET)
|
|
87
|
+
citations: list[AnswerSpanCitation] | Unset = UNSET
|
|
88
|
+
if _citations is not UNSET:
|
|
89
|
+
citations = []
|
|
90
|
+
for citations_item_data in _citations:
|
|
91
|
+
citations_item = AnswerSpanCitation.from_dict(citations_item_data)
|
|
92
|
+
|
|
93
|
+
citations.append(citations_item)
|
|
94
|
+
|
|
67
95
|
raw = d.pop("raw", UNSET)
|
|
68
96
|
|
|
69
97
|
agent_search_response = cls(
|
|
70
98
|
engine=engine,
|
|
71
99
|
query=query,
|
|
72
100
|
answer=answer,
|
|
101
|
+
citations=citations,
|
|
73
102
|
raw=raw,
|
|
74
103
|
)
|
|
75
104
|
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar, cast
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
from ..types import UNSET, Unset
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="AnswerSpanCitation")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class AnswerSpanCitation:
|
|
16
|
+
"""A source cited at a specific span of the answer text.
|
|
17
|
+
|
|
18
|
+
Grounding with Bing Search reports these as ``url_citation`` annotations:
|
|
19
|
+
the agent writes a marker such as ``【4:0†source】`` into its answer, and
|
|
20
|
+
Foundry attaches the source to that marker's character span.
|
|
21
|
+
|
|
22
|
+
Attributes:
|
|
23
|
+
url (str): URL of the cited source
|
|
24
|
+
marker (str): Answer text between start_index and end_index
|
|
25
|
+
start_index (int): Character offset in the answer where the marker starts
|
|
26
|
+
end_index (int): Character offset in the answer just past the marker
|
|
27
|
+
title (None | str | Unset): Title of the cited source
|
|
28
|
+
output_item_id (None | str | Unset): Output item the citation is attached to, if the provider reports one
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
url: str
|
|
32
|
+
marker: str
|
|
33
|
+
start_index: int
|
|
34
|
+
end_index: int
|
|
35
|
+
title: None | str | Unset = UNSET
|
|
36
|
+
output_item_id: None | str | Unset = UNSET
|
|
37
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
38
|
+
|
|
39
|
+
def to_dict(self) -> dict[str, Any]:
|
|
40
|
+
url = self.url
|
|
41
|
+
|
|
42
|
+
marker = self.marker
|
|
43
|
+
|
|
44
|
+
start_index = self.start_index
|
|
45
|
+
|
|
46
|
+
end_index = self.end_index
|
|
47
|
+
|
|
48
|
+
title: None | str | Unset
|
|
49
|
+
if isinstance(self.title, Unset):
|
|
50
|
+
title = UNSET
|
|
51
|
+
else:
|
|
52
|
+
title = self.title
|
|
53
|
+
|
|
54
|
+
output_item_id: None | str | Unset
|
|
55
|
+
if isinstance(self.output_item_id, Unset):
|
|
56
|
+
output_item_id = UNSET
|
|
57
|
+
else:
|
|
58
|
+
output_item_id = self.output_item_id
|
|
59
|
+
|
|
60
|
+
field_dict: dict[str, Any] = {}
|
|
61
|
+
field_dict.update(self.additional_properties)
|
|
62
|
+
field_dict.update(
|
|
63
|
+
{
|
|
64
|
+
"url": url,
|
|
65
|
+
"marker": marker,
|
|
66
|
+
"startIndex": start_index,
|
|
67
|
+
"endIndex": end_index,
|
|
68
|
+
}
|
|
69
|
+
)
|
|
70
|
+
if title is not UNSET:
|
|
71
|
+
field_dict["title"] = title
|
|
72
|
+
if output_item_id is not UNSET:
|
|
73
|
+
field_dict["outputItemId"] = output_item_id
|
|
74
|
+
|
|
75
|
+
return field_dict
|
|
76
|
+
|
|
77
|
+
@classmethod
|
|
78
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
79
|
+
d = dict(src_dict)
|
|
80
|
+
url = d.pop("url")
|
|
81
|
+
|
|
82
|
+
marker = d.pop("marker")
|
|
83
|
+
|
|
84
|
+
start_index = d.pop("startIndex")
|
|
85
|
+
|
|
86
|
+
end_index = d.pop("endIndex")
|
|
87
|
+
|
|
88
|
+
def _parse_title(data: object) -> None | str | Unset:
|
|
89
|
+
if data is None:
|
|
90
|
+
return data
|
|
91
|
+
if isinstance(data, Unset):
|
|
92
|
+
return data
|
|
93
|
+
return cast(None | str | Unset, data)
|
|
94
|
+
|
|
95
|
+
title = _parse_title(d.pop("title", UNSET))
|
|
96
|
+
|
|
97
|
+
def _parse_output_item_id(data: object) -> None | str | Unset:
|
|
98
|
+
if data is None:
|
|
99
|
+
return data
|
|
100
|
+
if isinstance(data, Unset):
|
|
101
|
+
return data
|
|
102
|
+
return cast(None | str | Unset, data)
|
|
103
|
+
|
|
104
|
+
output_item_id = _parse_output_item_id(d.pop("outputItemId", UNSET))
|
|
105
|
+
|
|
106
|
+
answer_span_citation = cls(
|
|
107
|
+
url=url,
|
|
108
|
+
marker=marker,
|
|
109
|
+
start_index=start_index,
|
|
110
|
+
end_index=end_index,
|
|
111
|
+
title=title,
|
|
112
|
+
output_item_id=output_item_id,
|
|
113
|
+
)
|
|
114
|
+
|
|
115
|
+
answer_span_citation.additional_properties = d
|
|
116
|
+
return answer_span_citation
|
|
117
|
+
|
|
118
|
+
@property
|
|
119
|
+
def additional_keys(self) -> list[str]:
|
|
120
|
+
return list(self.additional_properties.keys())
|
|
121
|
+
|
|
122
|
+
def __getitem__(self, key: str) -> Any:
|
|
123
|
+
return self.additional_properties[key]
|
|
124
|
+
|
|
125
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
126
|
+
self.additional_properties[key] = value
|
|
127
|
+
|
|
128
|
+
def __delitem__(self, key: str) -> None:
|
|
129
|
+
del self.additional_properties[key]
|
|
130
|
+
|
|
131
|
+
def __contains__(self, key: str) -> bool:
|
|
132
|
+
return key in self.additional_properties
|
|
@@ -58,16 +58,17 @@ class OpenapiTransport:
|
|
|
58
58
|
"""Per-request context kwargs for the generated ``/v1`` route helpers.
|
|
59
59
|
|
|
60
60
|
The generated helpers default ``x_unique_company_id`` / ``x_unique_user_id``
|
|
61
|
-
/ ``x_unique_chat_id`` to ``"local"`` and
|
|
62
|
-
|
|
63
|
-
headers
|
|
64
|
-
|
|
65
|
-
transport's context authoritative.
|
|
61
|
+
/ ``x_unique_chat_id`` to ``"local"`` and ``x_unique_entry_point`` to
|
|
62
|
+
``"unknown"``, and always attach them as request headers. In httpx,
|
|
63
|
+
request headers win over the client-level default headers, so relying on
|
|
64
|
+
the client-level context alone silently resets a non-local context on every
|
|
65
|
+
call. Forwarding these keeps the transport's context authoritative.
|
|
66
66
|
"""
|
|
67
67
|
return {
|
|
68
68
|
"x_unique_company_id": self._context.company_id,
|
|
69
69
|
"x_unique_user_id": self._context.user_id,
|
|
70
70
|
"x_unique_chat_id": self._context.chat_id,
|
|
71
|
+
"x_unique_entry_point": self._context.entry_point.value,
|
|
71
72
|
}
|
|
72
73
|
|
|
73
74
|
async def aclose(self) -> None:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|