openserp 0.2.2__tar.gz → 0.2.4__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: openserp
3
- Version: 0.2.2
3
+ Version: 0.2.4
4
4
  Summary: Python SDK for the OpenSERP self-hosted server and OpenSERP Cloud.
5
5
  Project-URL: Homepage, https://openserp.org
6
6
  Project-URL: Documentation, https://openserp.org/docs
@@ -184,8 +184,7 @@ To enrich top search results with cleaned page content, pass the extraction flag
184
184
  grounded = client.search(
185
185
  engine="google",
186
186
  text="openserp docs",
187
- extract=True,
188
- extract_top=3,
187
+ extract=3,
189
188
  extract_mode="auto",
190
189
  min_runes=500,
191
190
  )
@@ -140,8 +140,7 @@ To enrich top search results with cleaned page content, pass the extraction flag
140
140
  grounded = client.search(
141
141
  engine="google",
142
142
  text="openserp docs",
143
- extract=True,
144
- extract_top=3,
143
+ extract=3,
145
144
  extract_mode="auto",
146
145
  min_runes=500,
147
146
  )
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "openserp"
7
- version = "0.2.2"
7
+ version = "0.2.4"
8
8
  description = "Python SDK for the OpenSERP self-hosted server and OpenSERP Cloud."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -87,7 +87,7 @@ class _BaseOpenSERP:
87
87
  raise OssOnlyError(method)
88
88
 
89
89
  def _merged_headers(self, headers: Mapping[str, str] | None = None) -> dict[str, str]:
90
- merged = dict(self.headers)
90
+ merged = {"X-OpenSERP-Client": "sdk-python", **self.headers}
91
91
  if self.api_key:
92
92
  merged["Authorization"] = f"Bearer {self.api_key}"
93
93
  if headers:
@@ -183,8 +183,7 @@ def test_search_supports_embedded_extraction_params_and_result_model() -> None:
183
183
  response = client.search(
184
184
  engine="google",
185
185
  text="openserp",
186
- extract=True,
187
- extract_top=2,
186
+ extract=2,
188
187
  extract_mode="fast",
189
188
  min_runes=500,
190
189
  )
@@ -195,8 +194,7 @@ def test_search_supports_embedded_extraction_params_and_result_model() -> None:
195
194
  assert response.results[0].extracted.content == "# OpenSERP"
196
195
 
197
196
  request = route.calls.last.request
198
- assert request.url.params["extract"] == "true"
199
- assert request.url.params["extract_top"] == "2"
197
+ assert request.url.params["extract"] == "2"
200
198
  assert request.url.params["extract_mode"] == "fast"
201
199
  assert request.url.params["min_runes"] == "500"
202
200
 
File without changes
File without changes
File without changes