diff --git a/Changelog.md b/Changelog.md index c8214a4..40bd29d 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,9 @@ # Changelog +## 3.4.2a1 + +- Alpha release for exporting type hints + ## 3.4.1 - `PromptTemplate` now resets cached non-text items after generating prompt diff --git a/aleph_alpha_client/py.typed b/aleph_alpha_client/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/aleph_alpha_client/version.py b/aleph_alpha_client/version.py index a5cfdf5..f29ec04 100644 --- a/aleph_alpha_client/version.py +++ b/aleph_alpha_client/version.py @@ -1 +1 @@ -__version__ = "3.4.1" +__version__ = "3.4.2a1" diff --git a/setup.py b/setup.py index 77a526a..62e6d4e 100644 --- a/setup.py +++ b/setup.py @@ -39,6 +39,7 @@ def version(): author="Aleph Alpha", author_email="support@aleph-alpha.com", packages=["aleph_alpha_client"], + package_data={"aleph_alpha_client": ["py.typed"]}, # urllib is used directly for retries install_requires=[ "requests >= 2.28", diff --git a/tests/test_prompt_template.py b/tests/test_prompt_template.py index 52a4ba7..36d8de1 100644 --- a/tests/test_prompt_template.py +++ b/tests/test_prompt_template.py @@ -163,3 +163,12 @@ def test_to_prompt_works_with_tokens(): prompt = template.to_prompt(user_prompt=template.embed_prompt(user_prompt)) assert prompt == user_prompt + +def test_to_prompt_resets_cache(prompt_image: Image): + user_prompt = Prompt([prompt_image, Text.from_text("Cool"), prompt_image]) + + template = PromptTemplate("{{user_prompt}}") + + template.to_prompt(user_prompt=template.embed_prompt(user_prompt)) + + assert template.non_text_items == {}