keenable-haystack 0.1.2__tar.gz → 0.1.3__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
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.5
2
2
  Name: keenable-haystack
3
- Version: 0.1.2
3
+ Version: 0.1.3
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
@@ -145,7 +145,14 @@ class KeenableWebSearch:
145
145
  for result in results:
146
146
  if not isinstance(result, dict):
147
147
  continue
148
- content = result.get("description") or result.get("title") or ""
148
+ # `snippet` carries the page text; `description` is usually empty, so
149
+ # reading it first would leave content as the bare title.
150
+ content = (
151
+ result.get("snippet")
152
+ or result.get("description")
153
+ or result.get("title")
154
+ or ""
155
+ )
149
156
  documents.append(Document(content=content, meta=dict(result)))
150
157
  link = result.get("url")
151
158
  if link:
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "keenable-haystack"
7
- version = "0.1.2"
7
+ version = "0.1.3"
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" }]