unique_toolkit 0.7.33__py3-none-any.whl → 0.7.34__py3-none-any.whl

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.
@@ -190,9 +190,11 @@ def count_tokens(text: str, encoding_model="cl100k_base") -> int:
190
190
  return len(encoding.encode(text))
191
191
 
192
192
 
193
- def map_content_chunk(content_chunk: dict):
193
+ def map_content_chunk(content_id: str, content_key: str, content_chunk: dict):
194
194
  return ContentChunk(
195
- id=content_chunk["id"],
195
+ id=content_id,
196
+ key=content_key,
197
+ chunk_id=content_chunk["id"],
196
198
  text=content_chunk["text"],
197
199
  start_page=content_chunk["startPage"],
198
200
  end_page=content_chunk["endPage"],
@@ -206,7 +208,10 @@ def map_content(content: dict):
206
208
  key=content["key"],
207
209
  title=content["title"],
208
210
  url=content["url"],
209
- chunks=[map_content_chunk(chunk) for chunk in content["chunks"]],
211
+ chunks=[
212
+ map_content_chunk(content["id"], content["key"], chunk)
213
+ for chunk in content["chunks"]
214
+ ],
210
215
  created_at=content["createdAt"],
211
216
  updated_at=content["updatedAt"],
212
217
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: unique_toolkit
3
- Version: 0.7.33
3
+ Version: 0.7.34
4
4
  Summary:
5
5
  License: Proprietary
6
6
  Author: Martin Fadler
@@ -111,6 +111,9 @@ All notable changes to this project will be documented in this file.
111
111
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
112
112
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
113
113
 
114
+ ## [0.7.34] - 2025-05-30
115
+ - Fix incorrect mapping in `ContentService` for the `search_content` function when mapping into `ContentChunk` object
116
+
114
117
  ## [0.7.33] - 2025-06-25
115
118
  - Update reference post-processing
116
119
 
@@ -23,7 +23,7 @@ unique_toolkit/content/constants.py,sha256=1iy4Y67xobl5VTnJB6SxSyuoBWbdLl9244xfV
23
23
  unique_toolkit/content/functions.py,sha256=0ELepm3_sl0SD_SYzvQVQ-jTdrcUqK5mVJZv0nQBuAw,18367
24
24
  unique_toolkit/content/schemas.py,sha256=KJ604BOx0vBh2AwlTCZkOo55aHsI6yj8vxDAARKKqEo,2995
25
25
  unique_toolkit/content/service.py,sha256=jGRTIt0JQKL6qRyZ9-_njWJejKKvIvDOzEQrf8CdMaU,19491
26
- unique_toolkit/content/utils.py,sha256=GUVPrkZfMoAj4MRoBs5BD_7vSuLZTZx69hyWzYFrI50,7747
26
+ unique_toolkit/content/utils.py,sha256=qNVmHTuETaPNGqheg7TbgPr1_1jbNHDc09N5RrmUIyo,7901
27
27
  unique_toolkit/embedding/__init__.py,sha256=uUyzjonPvuDCYsvXCIt7ErQXopLggpzX-MEQd3_e2kE,250
28
28
  unique_toolkit/embedding/constants.py,sha256=Lj8-Lcy1FvuC31PM9Exq7vaFuxQV4pEI1huUMFX-J2M,52
29
29
  unique_toolkit/embedding/functions.py,sha256=3qp-BfuMAbnp8YB04rh3xH8vsJuCBPizoy-JeaBFtoQ,1944
@@ -62,7 +62,7 @@ unique_toolkit/short_term_memory/schemas.py,sha256=OhfcXyF6ACdwIXW45sKzjtZX_gkcJ
62
62
  unique_toolkit/short_term_memory/service.py,sha256=cqpXA0nMbi4PhFweg-Cql3u0RvaTi5c8Xjv0uHMiSGc,8112
63
63
  unique_toolkit/smart_rules/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
64
64
  unique_toolkit/smart_rules/compile.py,sha256=cxWjb2dxEI2HGsakKdVCkSNi7VK9mr08w5sDcFCQyWI,9553
65
- unique_toolkit-0.7.33.dist-info/LICENSE,sha256=GlN8wHNdh53xwOPg44URnwag6TEolCjoq3YD_KrWgss,193
66
- unique_toolkit-0.7.33.dist-info/METADATA,sha256=iTa95C3sVeL6SR4HrO3jny6n2kmpoNunzUYeQNhdiNM,24774
67
- unique_toolkit-0.7.33.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
68
- unique_toolkit-0.7.33.dist-info/RECORD,,
65
+ unique_toolkit-0.7.34.dist-info/LICENSE,sha256=GlN8wHNdh53xwOPg44URnwag6TEolCjoq3YD_KrWgss,193
66
+ unique_toolkit-0.7.34.dist-info/METADATA,sha256=1OxeaVaHJorHRvzuJ8TXg6cbe-4PqT9iUMF-FZ5rG1Q,24918
67
+ unique_toolkit-0.7.34.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
68
+ unique_toolkit-0.7.34.dist-info/RECORD,,