keenable-haystack 0.1.0__tar.gz → 0.1.1__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: keenable-haystack
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: Keenable web-search and page-fetch components for Haystack. Keyless by default.
5
5
  Project-URL: Homepage, https://keenable.ai
6
6
  Project-URL: Documentation, https://docs.keenable.ai
@@ -9,6 +9,7 @@ from haystack.utils import Secret, deserialize_secrets_inplace
9
9
 
10
10
  from haystack_integrations.components.websearch.keenable._client import (
11
11
  KeenableError,
12
+ _redact,
12
13
  keenable_post,
13
14
  normalize_key,
14
15
  )
@@ -136,7 +137,9 @@ class KeenableWebSearch:
136
137
  data = keenable_post("/v1/search/public", "/v1/search", payload, api_key, self.timeout)
137
138
  results = data.get("results")
138
139
  if not isinstance(results, list):
139
- msg = f"Unexpected response from the Keenable search API: {data!r}"
140
+ # Redact like _client does: a 200 body could echo the key (e.g. a
141
+ # debug field), and it would otherwise land in the exception text.
142
+ msg = f"Unexpected response from the Keenable search API: {_redact(repr(data)[:200], api_key)}"
140
143
  raise KeenableError(msg)
141
144
 
142
145
  if self.top_k is not None:
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "keenable-haystack"
7
- version = "0.1.0"
7
+ version = "0.1.1"
8
8
  description = "Keenable web-search and page-fetch components for Haystack. Keyless by default."
9
9
  authors = [{ name = "Keenable", email = "hello@keenable.ai" }]
10
10
  maintainers = [{ name = "keenableai" }]