diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d0cb00..d6a2539 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,27 @@ Notable changes to Format based on [Keep a Changelog](https://keepachangelog.co --> +## [0.9.2] - 20240625 + +### Added + +- `joiner` param to `text_helper.text_split()` for better control of regex separator handling +- query filter mix-in, `embedding.pgvector.match_oneof()`, for use with `meta_filter` argument to `DB.search` + +### Changed + +- Index word loom items by their literal default language text, as well +- Cleaned up PGVector query-building logic + +### Fixed + +- `llm_wrapper.llm_response` objects to handle tool calls +- failure of some matching scenarios in `embedding.pgvector.match_exact()` + +### Removed + +- Previously deprecated `first_choice_text` & `first_choice_message` methods + ## [0.9.1] - 20240604 ### Fixed diff --git a/pylib/__about__.py b/pylib/__about__.py index c328666..91abf7b 100644 --- a/pylib/__about__.py +++ b/pylib/__about__.py @@ -3,4 +3,4 @@ # SPDX-License-Identifier: Apache-2.0 # ogbujipt.about -__version__ = '0.10.0' +__version__ = '0.9.2' diff --git a/pylib/word_loom.py b/pylib/word_loom.py index c43740b..711d71d 100644 --- a/pylib/word_loom.py +++ b/pylib/word_loom.py @@ -140,7 +140,12 @@ def load(fp_or_str, lang='en', preserve_key=False): meta = {kk: vv for kk, vv in v.items() if (not kk.startswith('_') and kk not in ('text', 'markers'))} if preserve_key: meta['_key'] = k + if k in texts: + warnings.warn(f'Key {k} duplicates an existing item, which will be overwritten') texts[k] = T(text, lang, altlang=altlang, meta=meta, markers=markers) # Also index by literal text + if text in texts: + warnings.warn( + f'Item default language text {text[:20]} duplicates an existing item, which will be overwritten') texts[text] = T(text, lang, altlang=altlang, meta=meta, markers=markers) return texts diff --git a/test/test_word_loom.py b/test/test_word_loom.py index 5034a87..136ead3 100644 --- a/test/test_word_loom.py +++ b/test/test_word_loom.py @@ -12,7 +12,7 @@ import os import sys -from itertools import chain +# from itertools import chain import pytest