From 5d4862c0c5d634f7586228bda3bcf16b183e65fb Mon Sep 17 00:00:00 2001 From: MuggleJinx <348653177@qq.com> Date: Fri, 13 Dec 2024 15:52:22 +0300 Subject: [PATCH 01/11] add outline-converter and example --- camel/schemas/__init__.py | 3 +- camel/schemas/outlines_converter.py | 168 ++++++++++++++++++ .../outlines-converter-example.py | 129 ++++++++++++++ 3 files changed, 299 insertions(+), 1 deletion(-) create mode 100644 camel/schemas/outlines_converter.py create mode 100644 examples/schema_outputs/outlines-converter-example.py diff --git a/camel/schemas/__init__.py b/camel/schemas/__init__.py index 7908e0c99a..424c436256 100644 --- a/camel/schemas/__init__.py +++ b/camel/schemas/__init__.py @@ -13,5 +13,6 @@ # ========= Copyright 2023-2024 @ CAMEL-AI.org. All Rights Reserved. ========= from .openai_converter import OpenAISchemaConverter +from .outlines_converter import OutlinesConverter -__all__ = ["OpenAISchemaConverter"] +__all__ = ["OpenAISchemaConverter", "OutlinesConverter"] diff --git a/camel/schemas/outlines_converter.py b/camel/schemas/outlines_converter.py new file mode 100644 index 0000000000..6b2b846b4b --- /dev/null +++ b/camel/schemas/outlines_converter.py @@ -0,0 +1,168 @@ +# ========= Copyright 2023-2024 @ CAMEL-AI.org. All Rights Reserved. ========= +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ========= Copyright 2023-2024 @ CAMEL-AI.org. All Rights Reserved. ========= + +from typing import Any, Callable, Dict, List, Optional, Type, Union, Literal + +import outlines +from pydantic import BaseModel + +from .base import BaseConverter + + +class OutlinesConverter(BaseConverter): + r"""OutlinesConverter is a class that converts a string or a function + into a BaseModel schema. + + Args: + model_type (str, optional): The model type to be used. + platform (str, optional): The platform to be used. + 1. transformers + 2. mamba + 3. vllm + 4. llamacpp + 5. mlx + (default: "transformers") + **kwargs: The keyword arguments to be used. See the outlines documentation for more details. + https://dottxt-ai.github.io/outlines/latest/reference/models/models/ + """ + + def __init__( + self, + model_type: str, + platform: str = "transformers", + **kwargs: Any + ): + self.model_type = model_type + from outlines import models + match platform: + case "vllm": + self._outlines_model = models.vllm(model_type, **kwargs) + case "transformers": + self._outlines_model = models.transformers(model_type, **kwargs ) + case "mamba": + self._outlines_model = models.mamba(model_type, **kwargs) + case "llamacpp": + self._outlines_model = models.llamacpp(model_type, **kwargs) + case "mlx": + self._outlines_model = models.mlxlm(model_type, **kwargs) + case _: + raise ValueError(f"Unsupported platform: {platform}") + + def convert_regex(self, content: str, regex_pattern: str): + r'''Convert the content to the specified regex pattern. + + Args: + content (str): The content to be converted. + regex_pattern (str): The regex pattern to be used. + + Returns: + str: The converted content. + ''' + regex_generator = outlines.generate.regex(self._outlines_model, regex_pattern) + return regex_generator(content) + + def convert_json( + self, + content: str, + output_schema: Union[Type[BaseModel], str, Callable] + ): + r'''Convert the content to the specified JSON schema. + + Args: + content (str): The content to be converted. + output_schema (Union[Type[BaseModel], str, Callable]): The expected + format of the response. + + Returns: + str: The converted content. + ''' + json_generator = outlines.generate.json(self._outlines_model, output_schema) + return json_generator(content) + + def convert_type(self, content: str, type_name: type): + r'''Convert the content to the specified type. + + The following types are currently available: + 1. int + 2. float + 3. bool + 4. datetime.date + 5. datetime.time + 6. datetime.datetime + 7. custom types (https://dottxt-ai.github.io/outlines/latest/reference/generation/types/) + + Args: + content (str): The content to be converted. + type_name (type): The type to be used. + + Returns: + str: The converted content. + ''' + type_generator = outlines.generate.format(self._outlines_model, type_name) + return type_generator(content) + + def convert_choice(self, content: str, choices: List[str]): + r'''Convert the content to the specified choice. + + Args: + content (str): The content to be converted. + choices (List[str]): The choices to be used. + + Returns: + str: The converted content. + ''' + choices_generator = outlines.generate.choice(self._outlines_model, choices) + return choices_generator(content) + + def convert_grammar(self, content: str, grammar: str): + r'''Convert the content to the specified grammar. + + Args: + content (str): The content to be converted. + grammar (str): The grammar to be used. + + Returns: + str: The converted content. + ''' + grammar_generator = outlines.generate.cfg(self._outlines_model, grammar) + return grammar_generator(content) + + def convert( # type: ignore[override] + self, + type: Literal["regex", "json", "type", "choice", "grammar"], + content: str, + **kwargs + ) -> BaseModel: + r"""Formats the input content into the expected BaseModel + + Args: + content (str): The content to be formatted. + **kwargs: The keyword arguments to be used. + + Returns: + BaseModel: The formatted response. + """ + match type: + case "regex": + return self.convert_regex(content, kwargs.get("regex_pattern")) + case "json": + return self.convert_json(content, kwargs.get("output_schema")) + case "type": + return self.convert_type(content, kwargs.get("type_name")) + case "choice": + return self.convert_choice(content, kwargs.get("choices")) + case "grammar": + return self.convert_grammar(content, kwargs.get("grammar")) + case _: + raise ValueError("Unsupported output schema type") diff --git a/examples/schema_outputs/outlines-converter-example.py b/examples/schema_outputs/outlines-converter-example.py new file mode 100644 index 0000000000..253caaef6f --- /dev/null +++ b/examples/schema_outputs/outlines-converter-example.py @@ -0,0 +1,129 @@ +# ========= Copyright 2023-2024 @ CAMEL-AI.org. All Rights Reserved. ========= +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ========= Copyright 2023-2024 @ CAMEL-AI.org. All Rights Reserved. ========= + +from pydantic import BaseModel + +from camel.schemas import OutlinesConverter + +# Define the model using OutlinesConverter +model = OutlinesConverter( + model_type="microsoft/Phi-3-mini-4k-instruct", + platform="transformers" +) + +######## Regex conversion ######### + +time_regex_pattern = r"(0?[1-9]|1[0-2]):[0-5]\d\s?(am|pm)?" +output = model.convert_regex("The the best time to visit a dentist is at ", time_regex_pattern) + +print(output) +''' +6:00 pm +''' + + +######## JSON conversion ######### + +# 1. Using a Pydantic model +class Temperature(BaseModel): + location: str + date: str + temperature: float + +output = model.convert_json( + "Today is 2023-09-01, the temperature in Beijing is 30 degrees.", + output_schema=Temperature, +) + +print(output) +''' +location='Beijing' date='2023-09-01' temperature=30.0 +''' + +# 2. Using a JSON schema +schema = """ +{ + "title": "User", + "type": "object", + "properties": { + "name": {"type": "string"}, + "last_name": {"type": "string"}, + "id": {"type": "integer"} + }, + "required": ["name", "last_name", "id"] +} +""" + +output = model.convert_json( + "Create a user profile with the fields name, last_name and id", + output_schema=schema, +) + +print(output) +''' +{'name': 'John', 'last_name': 'Doe', 'id': 123456} +''' + + +####### Type constraints ####### +output = model.convert_type( + "When I was 6 my sister was half my age. Now I'm 70 how old is my sister?", + int, +) + +print(output) +''' +35 +''' + + +####### Mutliple choices ####### + +output = model.convert_choice( + "What is the capital of Spain?", + ["Paris", "London", "Berlin", "Madrid"], +) + +print(output) +''' +Madrid +''' + + +####### Grammer ####### + +arithmetic_grammar = """ + ?start: expression + + ?expression: term (("+" | "-") term)* + + ?term: factor (("*" | "/") factor)* + + ?factor: NUMBER + | "-" factor + | "(" expression ")" + + %import common.NUMBER +""" + +output = model.convert_grammar( + "Alice had 4 apples and Bob ate 2. " + + "Write an expression for Alice's apples:", + arithmetic_grammar, +) + +print(output) +''' +(8-2) +''' \ No newline at end of file From 55c314ff1aa17ae6648342cd032d6f49053f6865 Mon Sep 17 00:00:00 2001 From: Xiaotian Jin Date: Fri, 13 Dec 2024 16:46:53 +0300 Subject: [PATCH 02/11] update .toml file --- poetry.lock | 299 +++++++++++++++++++++++++++++++++++++------------ pyproject.toml | 1 + 2 files changed, 229 insertions(+), 71 deletions(-) diff --git a/poetry.lock b/poetry.lock index 6718f25970..05c47a4b72 100644 --- a/poetry.lock +++ b/poetry.lock @@ -207,6 +207,17 @@ files = [ [package.dependencies] frozenlist = ">=1.1.0" +[[package]] +name = "airportsdata" +version = "20241001" +description = "Extensive database of location and timezone data for nearly every airport and landing strip in the world." +optional = false +python-versions = ">=3.9" +files = [ + {file = "airportsdata-20241001-py3-none-any.whl", hash = "sha256:67d71cf2c5378cc17ff66b62b1e11aa2444043949c894543ac8fd8dafce192fd"}, + {file = "airportsdata-20241001.tar.gz", hash = "sha256:fa0bd143b4f4be3557cb892fa0612ef210fd91a92bd720b4d8221de576a4fa00"}, +] + [[package]] name = "alabaster" version = "0.7.16" @@ -932,6 +943,17 @@ files = [ [package.dependencies] colorama = {version = "*", markers = "platform_system == \"Windows\""} +[[package]] +name = "cloudpickle" +version = "3.1.0" +description = "Pickler class to extend the standard pickle.Pickler functionality" +optional = false +python-versions = ">=3.8" +files = [ + {file = "cloudpickle-3.1.0-py3-none-any.whl", hash = "sha256:fe11acda67f61aaaec473e3afe030feb131d78a43461b718185363384f1ba12e"}, + {file = "cloudpickle-3.1.0.tar.gz", hash = "sha256:81a929b6e3c7335c863c771d673d105f02efdb89dfaba0c90495d1c64796601b"}, +] + [[package]] name = "cohere" version = "5.13.3" @@ -1483,6 +1505,17 @@ speed = ["Brotli", "aiodns (>=1.1)", "cchardet (==2.1.7)", "orjson (>=3.5.4)"] test = ["coverage[toml]", "pytest", "pytest-asyncio", "pytest-cov", "pytest-mock", "typing-extensions (>=4.3,<5)", "tzdata"] voice = ["PyNaCl (>=1.3.0,<1.6)"] +[[package]] +name = "diskcache" +version = "5.6.3" +description = "Disk Cache -- Disk and file backed persistent cache." +optional = false +python-versions = ">=3" +files = [ + {file = "diskcache-5.6.3-py3-none-any.whl", hash = "sha256:5e31b2d5fbad117cc363ebaf6b689474db18a1f6438bc82358b024abd4c2ca19"}, + {file = "diskcache-5.6.3.tar.gz", hash = "sha256:2c3a3fa2743d8535d832ec61c2054a1641f41775aa7c556758a109941e33e4fc"}, +] + [[package]] name = "distlib" version = "0.3.9" @@ -2924,6 +2957,17 @@ files = [ {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, ] +[[package]] +name = "interegular" +version = "0.3.3" +description = "a regex intersection checker" +optional = false +python-versions = ">=3.7" +files = [ + {file = "interegular-0.3.3-py37-none-any.whl", hash = "sha256:b0c07007d48c89d6d19f7204972d369b2a77222722e126b6aa63aa721dc3b19c"}, + {file = "interegular-0.3.3.tar.gz", hash = "sha256:d9b697b21b34884711399ba0f0376914b81899ce670032486d0d048344a76600"}, +] + [[package]] name = "iopath" version = "0.1.10" @@ -3448,6 +3492,23 @@ files = [ [package.dependencies] six = "*" +[[package]] +name = "lark" +version = "1.2.2" +description = "a modern parsing library" +optional = false +python-versions = ">=3.8" +files = [ + {file = "lark-1.2.2-py3-none-any.whl", hash = "sha256:c2276486b02f0f1b90be155f2c8ba4a8e194d42775786db622faccd652d8e80c"}, + {file = "lark-1.2.2.tar.gz", hash = "sha256:ca807d0162cd16cef15a8feecb862d7319e7a09bdb13aef927968e45040fed80"}, +] + +[package.extras] +atomic-cache = ["atomicwrites"] +interegular = ["interegular (>=0.3.1,<0.4.0)"] +nearley = ["js2py"] +regex = ["regex"] + [[package]] name = "layoutparser" version = "0.3.4" @@ -3836,52 +3897,52 @@ tests = ["pytest", "simplejson"] [[package]] name = "matplotlib" -version = "3.9.3" +version = "3.9.4" description = "Python plotting package" optional = false python-versions = ">=3.9" files = [ - {file = "matplotlib-3.9.3-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:41b016e3be4e740b66c79a031a0a6e145728dbc248142e751e8dab4f3188ca1d"}, - {file = "matplotlib-3.9.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8e0143975fc2a6d7136c97e19c637321288371e8f09cff2564ecd73e865ea0b9"}, - {file = "matplotlib-3.9.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9f459c8ee2c086455744723628264e43c884be0c7d7b45d84b8cd981310b4815"}, - {file = "matplotlib-3.9.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:687df7ceff57b8f070d02b4db66f75566370e7ae182a0782b6d3d21b0d6917dc"}, - {file = "matplotlib-3.9.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:edd14cf733fdc4f6e6fe3f705af97676a7e52859bf0044aa2c84e55be739241c"}, - {file = "matplotlib-3.9.3-cp310-cp310-win_amd64.whl", hash = "sha256:1c40c244221a1adbb1256692b1133c6fb89418df27bf759a31a333e7912a4010"}, - {file = "matplotlib-3.9.3-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:cf2a60daf6cecff6828bc608df00dbc794380e7234d2411c0ec612811f01969d"}, - {file = "matplotlib-3.9.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:213d6dc25ce686516208d8a3e91120c6a4fdae4a3e06b8505ced5b716b50cc04"}, - {file = "matplotlib-3.9.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c52f48eb75fcc119a4fdb68ba83eb5f71656999420375df7c94cc68e0e14686e"}, - {file = "matplotlib-3.9.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d3c93796b44fa111049b88a24105e947f03c01966b5c0cc782e2ee3887b790a3"}, - {file = "matplotlib-3.9.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:cd1077b9a09b16d8c3c7075a8add5ffbfe6a69156a57e290c800ed4d435bef1d"}, - {file = "matplotlib-3.9.3-cp311-cp311-win_amd64.whl", hash = "sha256:c96eeeb8c68b662c7747f91a385688d4b449687d29b691eff7068a4602fe6dc4"}, - {file = "matplotlib-3.9.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:0a361bd5583bf0bcc08841df3c10269617ee2a36b99ac39d455a767da908bbbc"}, - {file = "matplotlib-3.9.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:e14485bb1b83eeb3d55b6878f9560240981e7bbc7a8d4e1e8c38b9bd6ec8d2de"}, - {file = "matplotlib-3.9.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4a8d279f78844aad213c4935c18f8292a9432d51af2d88bca99072c903948045"}, - {file = "matplotlib-3.9.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b6c12514329ac0d03128cf1dcceb335f4fbf7c11da98bca68dca8dcb983153a9"}, - {file = "matplotlib-3.9.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:6e9de2b390d253a508dd497e9b5579f3a851f208763ed67fdca5dc0c3ea6849c"}, - {file = "matplotlib-3.9.3-cp312-cp312-win_amd64.whl", hash = "sha256:d796272408f8567ff7eaa00eb2856b3a00524490e47ad505b0b4ca6bb8a7411f"}, - {file = "matplotlib-3.9.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:203d18df84f5288973b2d56de63d4678cc748250026ca9e1ad8f8a0fd8a75d83"}, - {file = "matplotlib-3.9.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:b651b0d3642991259109dc0351fc33ad44c624801367bb8307be9bfc35e427ad"}, - {file = "matplotlib-3.9.3-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:66d7b171fecf96940ce069923a08ba3df33ef542de82c2ff4fe8caa8346fa95a"}, - {file = "matplotlib-3.9.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6be0ba61f6ff2e6b68e4270fb63b6813c9e7dec3d15fc3a93f47480444fd72f0"}, - {file = "matplotlib-3.9.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:9d6b2e8856dec3a6db1ae51aec85c82223e834b228c1d3228aede87eee2b34f9"}, - {file = "matplotlib-3.9.3-cp313-cp313-win_amd64.whl", hash = "sha256:90a85a004fefed9e583597478420bf904bb1a065b0b0ee5b9d8d31b04b0f3f70"}, - {file = "matplotlib-3.9.3-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:3119b2f16de7f7b9212ba76d8fe6a0e9f90b27a1e04683cd89833a991682f639"}, - {file = "matplotlib-3.9.3-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:87ad73763d93add1b6c1f9fcd33af662fd62ed70e620c52fcb79f3ac427cf3a6"}, - {file = "matplotlib-3.9.3-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:026bdf3137ab6022c866efa4813b6bbeddc2ed4c9e7e02f0e323a7bca380dfa0"}, - {file = "matplotlib-3.9.3-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:760a5e89ebbb172989e8273024a1024b0f084510b9105261b3b00c15e9c9f006"}, - {file = "matplotlib-3.9.3-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:a42b9dc42de2cfe357efa27d9c50c7833fc5ab9b2eb7252ccd5d5f836a84e1e4"}, - {file = "matplotlib-3.9.3-cp313-cp313t-win_amd64.whl", hash = "sha256:e0fcb7da73fbf67b5f4bdaa57d85bb585a4e913d4a10f3e15b32baea56a67f0a"}, - {file = "matplotlib-3.9.3-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:031b7f5b8e595cc07def77ec5b58464e9bb67dc5760be5d6f26d9da24892481d"}, - {file = "matplotlib-3.9.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:9fa6e193c14d6944e0685cdb527cb6b38b0e4a518043e7212f214113af7391da"}, - {file = "matplotlib-3.9.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4e6eefae6effa0c35bbbc18c25ee6e0b1da44d2359c3cd526eb0c9e703cf055d"}, - {file = "matplotlib-3.9.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:10d3e5c7a99bd28afb957e1ae661323b0800d75b419f24d041ed1cc5d844a764"}, - {file = "matplotlib-3.9.3-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:816a966d5d376bf24c92af8f379e78e67278833e4c7cbc9fa41872eec629a060"}, - {file = "matplotlib-3.9.3-cp39-cp39-win_amd64.whl", hash = "sha256:3fb0b37c896172899a4a93d9442ffdc6f870165f59e05ce2e07c6fded1c15749"}, - {file = "matplotlib-3.9.3-pp39-pypy39_pp73-macosx_10_15_x86_64.whl", hash = "sha256:5f2a4ea08e6876206d511365b0bc234edc813d90b930be72c3011bbd7898796f"}, - {file = "matplotlib-3.9.3-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:9b081dac96ab19c54fd8558fac17c9d2c9cb5cc4656e7ed3261ddc927ba3e2c5"}, - {file = "matplotlib-3.9.3-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0a0a63cb8404d1d1f94968ef35738900038137dab8af836b6c21bb6f03d75465"}, - {file = "matplotlib-3.9.3-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:896774766fd6be4571a43bc2fcbcb1dcca0807e53cab4a5bf88c4aa861a08e12"}, - {file = "matplotlib-3.9.3.tar.gz", hash = "sha256:cd5dbbc8e25cad5f706845c4d100e2c8b34691b412b93717ce38d8ae803bcfa5"}, + {file = "matplotlib-3.9.4-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:c5fdd7abfb706dfa8d307af64a87f1a862879ec3cd8d0ec8637458f0885b9c50"}, + {file = "matplotlib-3.9.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:d89bc4e85e40a71d1477780366c27fb7c6494d293e1617788986f74e2a03d7ff"}, + {file = "matplotlib-3.9.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ddf9f3c26aae695c5daafbf6b94e4c1a30d6cd617ba594bbbded3b33a1fcfa26"}, + {file = "matplotlib-3.9.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:18ebcf248030173b59a868fda1fe42397253f6698995b55e81e1f57431d85e50"}, + {file = "matplotlib-3.9.4-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:974896ec43c672ec23f3f8c648981e8bc880ee163146e0312a9b8def2fac66f5"}, + {file = "matplotlib-3.9.4-cp310-cp310-win_amd64.whl", hash = "sha256:4598c394ae9711cec135639374e70871fa36b56afae17bdf032a345be552a88d"}, + {file = "matplotlib-3.9.4-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:d4dd29641d9fb8bc4492420c5480398dd40a09afd73aebe4eb9d0071a05fbe0c"}, + {file = "matplotlib-3.9.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:30e5b22e8bcfb95442bf7d48b0d7f3bdf4a450cbf68986ea45fca3d11ae9d099"}, + {file = "matplotlib-3.9.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2bb0030d1d447fd56dcc23b4c64a26e44e898f0416276cac1ebc25522e0ac249"}, + {file = "matplotlib-3.9.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:aca90ed222ac3565d2752b83dbb27627480d27662671e4d39da72e97f657a423"}, + {file = "matplotlib-3.9.4-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:a181b2aa2906c608fcae72f977a4a2d76e385578939891b91c2550c39ecf361e"}, + {file = "matplotlib-3.9.4-cp311-cp311-win_amd64.whl", hash = "sha256:1f6882828231eca17f501c4dcd98a05abb3f03d157fbc0769c6911fe08b6cfd3"}, + {file = "matplotlib-3.9.4-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:dfc48d67e6661378a21c2983200a654b72b5c5cdbd5d2cf6e5e1ece860f0cc70"}, + {file = "matplotlib-3.9.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:47aef0fab8332d02d68e786eba8113ffd6f862182ea2999379dec9e237b7e483"}, + {file = "matplotlib-3.9.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fba1f52c6b7dc764097f52fd9ab627b90db452c9feb653a59945de16752e965f"}, + {file = "matplotlib-3.9.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:173ac3748acaac21afcc3fa1633924609ba1b87749006bc25051c52c422a5d00"}, + {file = "matplotlib-3.9.4-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:320edea0cadc07007765e33f878b13b3738ffa9745c5f707705692df70ffe0e0"}, + {file = "matplotlib-3.9.4-cp312-cp312-win_amd64.whl", hash = "sha256:a4a4cfc82330b27042a7169533da7991e8789d180dd5b3daeaee57d75cd5a03b"}, + {file = "matplotlib-3.9.4-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:37eeffeeca3c940985b80f5b9a7b95ea35671e0e7405001f249848d2b62351b6"}, + {file = "matplotlib-3.9.4-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:3e7465ac859ee4abcb0d836137cd8414e7bb7ad330d905abced457217d4f0f45"}, + {file = "matplotlib-3.9.4-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f4c12302c34afa0cf061bea23b331e747e5e554b0fa595c96e01c7b75bc3b858"}, + {file = "matplotlib-3.9.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2b8c97917f21b75e72108b97707ba3d48f171541a74aa2a56df7a40626bafc64"}, + {file = "matplotlib-3.9.4-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:0229803bd7e19271b03cb09f27db76c918c467aa4ce2ae168171bc67c3f508df"}, + {file = "matplotlib-3.9.4-cp313-cp313-win_amd64.whl", hash = "sha256:7c0d8ef442ebf56ff5e206f8083d08252ee738e04f3dc88ea882853a05488799"}, + {file = "matplotlib-3.9.4-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:a04c3b00066a688834356d196136349cb32f5e1003c55ac419e91585168b88fb"}, + {file = "matplotlib-3.9.4-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:04c519587f6c210626741a1e9a68eefc05966ede24205db8982841826af5871a"}, + {file = "matplotlib-3.9.4-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:308afbf1a228b8b525fcd5cec17f246bbbb63b175a3ef6eb7b4d33287ca0cf0c"}, + {file = "matplotlib-3.9.4-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ddb3b02246ddcffd3ce98e88fed5b238bc5faff10dbbaa42090ea13241d15764"}, + {file = "matplotlib-3.9.4-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:8a75287e9cb9eee48cb79ec1d806f75b29c0fde978cb7223a1f4c5848d696041"}, + {file = "matplotlib-3.9.4-cp313-cp313t-win_amd64.whl", hash = "sha256:488deb7af140f0ba86da003e66e10d55ff915e152c78b4b66d231638400b1965"}, + {file = "matplotlib-3.9.4-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:3c3724d89a387ddf78ff88d2a30ca78ac2b4c89cf37f2db4bd453c34799e933c"}, + {file = "matplotlib-3.9.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:d5f0a8430ffe23d7e32cfd86445864ccad141797f7d25b7c41759a5b5d17cfd7"}, + {file = "matplotlib-3.9.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6bb0141a21aef3b64b633dc4d16cbd5fc538b727e4958be82a0e1c92a234160e"}, + {file = "matplotlib-3.9.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:57aa235109e9eed52e2c2949db17da185383fa71083c00c6c143a60e07e0888c"}, + {file = "matplotlib-3.9.4-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:b18c600061477ccfdd1e6fd050c33d8be82431700f3452b297a56d9ed7037abb"}, + {file = "matplotlib-3.9.4-cp39-cp39-win_amd64.whl", hash = "sha256:ef5f2d1b67d2d2145ff75e10f8c008bfbf71d45137c4b648c87193e7dd053eac"}, + {file = "matplotlib-3.9.4-pp39-pypy39_pp73-macosx_10_15_x86_64.whl", hash = "sha256:44e0ed786d769d85bc787b0606a53f2d8d2d1d3c8a2608237365e9121c1a338c"}, + {file = "matplotlib-3.9.4-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:09debb9ce941eb23ecdbe7eab972b1c3e0276dcf01688073faff7b0f61d6c6ca"}, + {file = "matplotlib-3.9.4-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bcc53cf157a657bfd03afab14774d54ba73aa84d42cfe2480c91bd94873952db"}, + {file = "matplotlib-3.9.4-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:ad45da51be7ad02387801fd154ef74d942f49fe3fcd26a64c94842ba7ec0d865"}, + {file = "matplotlib-3.9.4.tar.gz", hash = "sha256:1e00e8be7393cbdc6fedfa8a6fba02cf3e83814b285db1c60b906a023ba41bc3"}, ] [package.dependencies] @@ -3896,7 +3957,7 @@ pyparsing = ">=2.3.1" python-dateutil = ">=2.7" [package.extras] -dev = ["meson-python (>=0.13.1)", "numpy (>=1.25)", "pybind11 (>=2.6,!=2.13.3)", "setuptools (>=64)", "setuptools_scm (>=7)"] +dev = ["meson-python (>=0.13.1,<0.17.0)", "numpy (>=1.25)", "pybind11 (>=2.6,!=2.13.3)", "setuptools (>=64)", "setuptools_scm (>=7)"] [[package]] name = "matplotlib-inline" @@ -3951,6 +4012,7 @@ python-versions = ">=3.7" files = [ {file = "milvus_lite-2.4.10-py3-none-macosx_10_9_x86_64.whl", hash = "sha256:fc4246d3ed7d1910847afce0c9ba18212e93a6e9b8406048436940578dfad5cb"}, {file = "milvus_lite-2.4.10-py3-none-macosx_11_0_arm64.whl", hash = "sha256:74a8e07c5e3b057df17fbb46913388e84df1dc403a200f4e423799a58184c800"}, + {file = "milvus_lite-2.4.10-py3-none-manylinux2014_aarch64.whl", hash = "sha256:240c7386b747bad696ecb5bd1f58d491e86b9d4b92dccee3315ed7256256eddc"}, {file = "milvus_lite-2.4.10-py3-none-manylinux2014_x86_64.whl", hash = "sha256:211d2e334a043f9282bdd9755f76b9b2d93b23bffa7af240919ffce6a8dfe325"}, ] @@ -4021,7 +4083,7 @@ files = [ name = "mpmath" version = "1.3.0" description = "Python library for arbitrary-precision floating-point arithmetic" -optional = true +optional = false python-versions = "*" files = [ {file = "mpmath-1.3.0-py3-none-any.whl", hash = "sha256:a0b2b9fe80bbcd81a6647ff13108738cfb482d481d826cc0e02f5b35e5c88d2c"}, @@ -4258,13 +4320,13 @@ testing-docutils = ["pygments", "pytest (>=8,<9)", "pytest-param-files (>=0.6.0, [[package]] name = "narwhals" -version = "1.17.0" +version = "1.18.2" description = "Extremely lightweight compatibility layer between dataframe libraries" optional = false python-versions = ">=3.8" files = [ - {file = "narwhals-1.17.0-py3-none-any.whl", hash = "sha256:03772e08a6e70d6a5029b2299fa4d4acc51411cca5119afffd6bbc4c762038f4"}, - {file = "narwhals-1.17.0.tar.gz", hash = "sha256:a2607fa66f0b6ccf6f54df57ee6bc4967b68095d2968c828894a5f77ed9d3c50"}, + {file = "narwhals-1.18.2-py3-none-any.whl", hash = "sha256:8f28812178bf67e4cbe46009e71aebbcdef78a52acd3d06a747f17189dba9d4a"}, + {file = "narwhals-1.18.2.tar.gz", hash = "sha256:7f9c72e6811635c0344193d4ce06c9d9d9fb4af37db4b7d60a76b4c929654f35"}, ] [package.extras] @@ -4416,7 +4478,7 @@ pyarrow = ["pyarrow (>=1.0.0)"] name = "nest-asyncio" version = "1.6.0" description = "Patch asyncio to allow nested event loops" -optional = true +optional = false python-versions = ">=3.5" files = [ {file = "nest_asyncio-1.6.0-py3-none-any.whl", hash = "sha256:87af6efd6b5e897c81050477ef65c62e2b2f35d51703cae01aff2905b1852e1c"}, @@ -4427,7 +4489,7 @@ files = [ name = "networkx" version = "3.4.2" description = "Python package for creating and manipulating graphs and networks" -optional = true +optional = false python-versions = ">=3.10" files = [ {file = "networkx-3.4.2-py3-none-any.whl", hash = "sha256:df5d4365b724cf81b8c6a7312509d0c22386097011ad1abe274afd5e9d3bbc5f"}, @@ -4567,7 +4629,7 @@ files = [ name = "nvidia-cublas-cu12" version = "12.4.5.8" description = "CUBLAS native runtime libraries" -optional = true +optional = false python-versions = ">=3" files = [ {file = "nvidia_cublas_cu12-12.4.5.8-py3-none-manylinux2014_aarch64.whl", hash = "sha256:0f8aa1706812e00b9f19dfe0cdb3999b092ccb8ca168c0db5b8ea712456fd9b3"}, @@ -4579,7 +4641,7 @@ files = [ name = "nvidia-cuda-cupti-cu12" version = "12.4.127" description = "CUDA profiling tools runtime libs." -optional = true +optional = false python-versions = ">=3" files = [ {file = "nvidia_cuda_cupti_cu12-12.4.127-py3-none-manylinux2014_aarch64.whl", hash = "sha256:79279b35cf6f91da114182a5ce1864997fd52294a87a16179ce275773799458a"}, @@ -4591,7 +4653,7 @@ files = [ name = "nvidia-cuda-nvrtc-cu12" version = "12.4.127" description = "NVRTC native runtime libraries" -optional = true +optional = false python-versions = ">=3" files = [ {file = "nvidia_cuda_nvrtc_cu12-12.4.127-py3-none-manylinux2014_aarch64.whl", hash = "sha256:0eedf14185e04b76aa05b1fea04133e59f465b6f960c0cbf4e37c3cb6b0ea198"}, @@ -4603,7 +4665,7 @@ files = [ name = "nvidia-cuda-runtime-cu12" version = "12.4.127" description = "CUDA Runtime native Libraries" -optional = true +optional = false python-versions = ">=3" files = [ {file = "nvidia_cuda_runtime_cu12-12.4.127-py3-none-manylinux2014_aarch64.whl", hash = "sha256:961fe0e2e716a2a1d967aab7caee97512f71767f852f67432d572e36cb3a11f3"}, @@ -4615,7 +4677,7 @@ files = [ name = "nvidia-cudnn-cu12" version = "9.1.0.70" description = "cuDNN runtime libraries" -optional = true +optional = false python-versions = ">=3" files = [ {file = "nvidia_cudnn_cu12-9.1.0.70-py3-none-manylinux2014_x86_64.whl", hash = "sha256:165764f44ef8c61fcdfdfdbe769d687e06374059fbb388b6c89ecb0e28793a6f"}, @@ -4629,7 +4691,7 @@ nvidia-cublas-cu12 = "*" name = "nvidia-cufft-cu12" version = "11.2.1.3" description = "CUFFT native runtime libraries" -optional = true +optional = false python-versions = ">=3" files = [ {file = "nvidia_cufft_cu12-11.2.1.3-py3-none-manylinux2014_aarch64.whl", hash = "sha256:5dad8008fc7f92f5ddfa2101430917ce2ffacd86824914c82e28990ad7f00399"}, @@ -4644,7 +4706,7 @@ nvidia-nvjitlink-cu12 = "*" name = "nvidia-curand-cu12" version = "10.3.5.147" description = "CURAND native runtime libraries" -optional = true +optional = false python-versions = ">=3" files = [ {file = "nvidia_curand_cu12-10.3.5.147-py3-none-manylinux2014_aarch64.whl", hash = "sha256:1f173f09e3e3c76ab084aba0de819c49e56614feae5c12f69883f4ae9bb5fad9"}, @@ -4656,7 +4718,7 @@ files = [ name = "nvidia-cusolver-cu12" version = "11.6.1.9" description = "CUDA solver native runtime libraries" -optional = true +optional = false python-versions = ">=3" files = [ {file = "nvidia_cusolver_cu12-11.6.1.9-py3-none-manylinux2014_aarch64.whl", hash = "sha256:d338f155f174f90724bbde3758b7ac375a70ce8e706d70b018dd3375545fc84e"}, @@ -4673,7 +4735,7 @@ nvidia-nvjitlink-cu12 = "*" name = "nvidia-cusparse-cu12" version = "12.3.1.170" description = "CUSPARSE native runtime libraries" -optional = true +optional = false python-versions = ">=3" files = [ {file = "nvidia_cusparse_cu12-12.3.1.170-py3-none-manylinux2014_aarch64.whl", hash = "sha256:9d32f62896231ebe0480efd8a7f702e143c98cfaa0e8a76df3386c1ba2b54df3"}, @@ -4688,7 +4750,7 @@ nvidia-nvjitlink-cu12 = "*" name = "nvidia-nccl-cu12" version = "2.21.5" description = "NVIDIA Collective Communication Library (NCCL) Runtime" -optional = true +optional = false python-versions = ">=3" files = [ {file = "nvidia_nccl_cu12-2.21.5-py3-none-manylinux2014_x86_64.whl", hash = "sha256:8579076d30a8c24988834445f8d633c697d42397e92ffc3f63fa26766d25e0a0"}, @@ -4698,7 +4760,7 @@ files = [ name = "nvidia-nvjitlink-cu12" version = "12.4.127" description = "Nvidia JIT LTO Library" -optional = true +optional = false python-versions = ">=3" files = [ {file = "nvidia_nvjitlink_cu12-12.4.127-py3-none-manylinux2014_aarch64.whl", hash = "sha256:4abe7fef64914ccfa909bc2ba39739670ecc9e820c83ccc7a6ed414122599b83"}, @@ -4710,7 +4772,7 @@ files = [ name = "nvidia-nvtx-cu12" version = "12.4.127" description = "NVIDIA Tools Extension" -optional = true +optional = false python-versions = ">=3" files = [ {file = "nvidia_nvtx_cu12-12.4.127-py3-none-manylinux2014_aarch64.whl", hash = "sha256:7959ad635db13edf4fc65c06a6e9f9e55fc2f92596db928d169c0bb031e88ef3"}, @@ -5130,6 +5192,87 @@ files = [ [package.dependencies] attrs = ">=19.2.0" +[[package]] +name = "outlines" +version = "0.1.11" +description = "Probabilistic Generative Model Programming" +optional = false +python-versions = ">=3.9" +files = [ + {file = "outlines-0.1.11-py3-none-any.whl", hash = "sha256:f5a5f2242ed9802d3aab7a92789bf4008d734c576be9258cc0a297f690124727"}, + {file = "outlines-0.1.11.tar.gz", hash = "sha256:0997bd9da1cc050e430bd08995dc7d4bd855918bafa4531e49d3f37110a23aba"}, +] + +[package.dependencies] +airportsdata = "*" +cloudpickle = "*" +diskcache = "*" +interegular = "*" +jinja2 = "*" +jsonschema = "*" +lark = "*" +nest_asyncio = "*" +numpy = "*" +outlines_core = "0.1.26" +pycountry = "*" +pydantic = ">=2.0" +referencing = "*" +requests = "*" +torch = "*" +tqdm = "*" +typing_extensions = "*" + +[package.extras] +exllamav2 = ["exllamav2"] +llamacpp = ["datasets", "llama-cpp-python", "numpy (<2)", "transformers"] +mlxlm = ["datasets", "mlx-lm"] +openai = ["openai"] +serve = ["fastapi", "pydantic (>=2.0)", "uvicorn", "vllm (>=0.3.0)"] +test = ["accelerate", "beartype (<0.16.0)", "coverage[toml] (>=5.1)", "datasets", "diff-cover", "exllamav2", "huggingface_hub", "jax", "llama-cpp-python", "mlx-lm (>=0.19.2)", "openai (>=1.0.0)", "pillow", "pre-commit", "pytest", "pytest-benchmark", "pytest-cov", "pytest-mock", "responses", "transformers", "vllm"] +transformers = ["accelerate", "datasets", "numpy (<2)", "transformers"] +vllm = ["numpy (<2)", "transformers", "vllm"] + +[[package]] +name = "outlines-core" +version = "0.1.26" +description = "Structured Text Generation in Rust" +optional = false +python-versions = ">=3.8" +files = [ + {file = "outlines_core-0.1.26-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:6a962a7452e7ac170fa04d405342cadae2d28fafa5b1830cef7aa610257ed32f"}, + {file = "outlines_core-0.1.26-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:15a3684fa29564da2db03934cf0097bef3e871f70d3af0ef2b52fdb886da2e09"}, + {file = "outlines_core-0.1.26-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:64e01c0cfa9ba371634d7c3f6ea1862397cef98e4509fe98e3f57faa721a72d6"}, + {file = "outlines_core-0.1.26-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a3c4196148e47f455f1ace78e329d5b97e531cbc406456d681592952adae7e17"}, + {file = "outlines_core-0.1.26-cp310-cp310-win32.whl", hash = "sha256:f38d290a7f6e5e12cbfcaee03269dfc0dbda49b360024b4279d1aba251fdc346"}, + {file = "outlines_core-0.1.26-cp310-cp310-win_amd64.whl", hash = "sha256:11ff56af56cb54c563b7f25d86cd9ee77f3fed825f1d4dccd9449bb1e4e89538"}, + {file = "outlines_core-0.1.26-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:b6787b07b7c673fc3087d2b537719ecac8e03b10a47d032dd1926985c32885b0"}, + {file = "outlines_core-0.1.26-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1e0ea28a76da31d25b6f53242bf13e1b59a0241badf82353c88f55e1cf81b128"}, + {file = "outlines_core-0.1.26-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a8932044a3d9329be53a226118850638f85b4d7842f9b863d0a123f23de220cd"}, + {file = "outlines_core-0.1.26-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a84b7cd2fb6268bf990dd3d479ffb4fa0bace6f571cb85b15b6cdb44b84f5b69"}, + {file = "outlines_core-0.1.26-cp311-cp311-win32.whl", hash = "sha256:f19765c151abfc970996368080aeea6d2a19e927817fe4e2af6726e639be3de4"}, + {file = "outlines_core-0.1.26-cp311-cp311-win_amd64.whl", hash = "sha256:3f59aeccea21ed6ff3cf52102fd163f26d279821c20e5127ddd18d4ea4d0c8d2"}, + {file = "outlines_core-0.1.26-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:f54633bca50055d42ea4d94ae06dcbe52d3d76a9b621b75723b1177d0d952953"}, + {file = "outlines_core-0.1.26-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:9525321b48700dcaaabf60bcdc951e45f9357ba3fb3e1bfc81b662d7d4170e7c"}, + {file = "outlines_core-0.1.26-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:00f409f72c11f6ffadb57066950dd384d5388015028c1a1a615c9a64988dae3e"}, + {file = "outlines_core-0.1.26-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e86a1bb46adc5cbf6dfd7a7fe4105e0e2a4c6e041732a053126b41c521a1f223"}, + {file = "outlines_core-0.1.26-cp312-cp312-win32.whl", hash = "sha256:19f462f6b00935708677ad27cb4df55e0e17f6ffe713ab750f5f2683b090f95d"}, + {file = "outlines_core-0.1.26-cp312-cp312-win_amd64.whl", hash = "sha256:9b36bff12779e58883747116893a17b3551bbd10865878b951b03a44d112229a"}, + {file = "outlines_core-0.1.26-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:7b7849cf40028319ebb9d8ba0fe4c590ef5888eebe524a81b3af30aaa06ea21c"}, + {file = "outlines_core-0.1.26-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:2f8641aab4a6bd84516907492ce82099503129da01b3c29c1dc9ad50320bae77"}, + {file = "outlines_core-0.1.26-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bba56604efdbc5932c7a8a88c2b8b0d0c740ab883b0012fb5464a9736796802b"}, + {file = "outlines_core-0.1.26-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8cc8c87d89bd267356f8149c9066cbb98970425ec162997fbf195c3f1feb7009"}, + {file = "outlines_core-0.1.26-cp39-cp39-win32.whl", hash = "sha256:9d792a43ed9d8a4e1b38f4d83fe99db442d57aad4404c2edf98b710892eda47e"}, + {file = "outlines_core-0.1.26-cp39-cp39-win_amd64.whl", hash = "sha256:ad8564ecd7b64bcb840596c5049ff1c1a96346de494302ffcc0f2b188c15675e"}, + {file = "outlines_core-0.1.26.tar.gz", hash = "sha256:481c4301341e77cc8f1832d616784adb4d461b4fec65878e7c0d2cba7163a189"}, +] + +[package.dependencies] +interegular = "*" +jsonschema = "*" + +[package.extras] +test = ["accelerate", "asv", "beartype (<0.16.0)", "coverage[toml] (>=5.1)", "datasets", "diff-cover", "huggingface_hub", "numpy", "pillow", "pre-commit", "psutil", "pydantic", "pytest", "pytest-benchmark", "pytest-cov", "pytest-mock", "scipy", "setuptools-rust", "torch", "transformers"] + [[package]] name = "packaging" version = "24.2" @@ -6039,6 +6182,7 @@ description = "Pure-Python implementation of ASN.1 types and DER/BER/CER codecs optional = true python-versions = ">=3.8" files = [ + {file = "pyasn1-0.6.1-py3-none-any.whl", hash = "sha256:0d632f46f2ba09143da3a8afe9e33fb6f92fa2320ab7e886e2d0f7672af84629"}, {file = "pyasn1-0.6.1.tar.gz", hash = "sha256:6f580d2bdd84365380830acf45550f2511469f673cb4a5ae3857a3170128b034"}, ] @@ -6049,6 +6193,7 @@ description = "A collection of ASN.1-based protocols modules" optional = true python-versions = ">=3.8" files = [ + {file = "pyasn1_modules-0.4.1-py3-none-any.whl", hash = "sha256:49bfa96b45a292b711e986f222502c1c9a5e1f4e568fc30e2574a6c7d07838fd"}, {file = "pyasn1_modules-0.4.1.tar.gz", hash = "sha256:c28e2dbf9c06ad61c71a075c7e0f9fd0f1b0bb2d2ad4377f240d33ac2ab60a7c"}, ] @@ -6097,6 +6242,17 @@ files = [ matplotlib = ">=2.1.0" numpy = "*" +[[package]] +name = "pycountry" +version = "24.6.1" +description = "ISO country, subdivision, language, currency and script definitions and their translations" +optional = false +python-versions = ">=3.8" +files = [ + {file = "pycountry-24.6.1-py3-none-any.whl", hash = "sha256:f1a4fb391cd7214f8eefd39556d740adcc233c778a27f8942c8dca351d6ce06f"}, + {file = "pycountry-24.6.1.tar.gz", hash = "sha256:b61b3faccea67f87d10c1f2b0fc0be714409e8fcdcc1315613174f6466c10221"}, +] + [[package]] name = "pycparser" version = "2.22" @@ -6354,6 +6510,7 @@ python-versions = ">=3.9" files = [ {file = "pymupdf-1.25.1-cp39-abi3-macosx_10_9_x86_64.whl", hash = "sha256:793f9f6d51029e97851c711b3f6d9fe912313d95a306fbe8b1866f301d0e2bd3"}, {file = "pymupdf-1.25.1-cp39-abi3-macosx_11_0_arm64.whl", hash = "sha256:15e6f4013ad0a029a2221920f9d2081f56dc43259dabfdf5cad7fbf1cee4b5a7"}, + {file = "pymupdf-1.25.1-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:a39afbd80381f43e30d6eb2ec4613f465f507ac2b76070abdd2da8724f32ef36"}, {file = "pymupdf-1.25.1-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:b63f8e9e65b0bda48f9217efd4d2a8c6d7a739dd28baf460c1ae78439b9af489"}, {file = "pymupdf-1.25.1-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:a687bd387589e30abd810a78a23341f57f43fa16a4d8d8c0b870bb6d89607343"}, {file = "pymupdf-1.25.1-cp39-abi3-win32.whl", hash = "sha256:fc7dbc1aa9e298a4c81084e389c9623c26fcaa232c71efaa073af150069e2221"}, @@ -7943,7 +8100,7 @@ files = [ name = "setuptools" version = "75.6.0" description = "Easily download, build, install, upgrade, and uninstall Python packages" -optional = true +optional = false python-versions = ">=3.9" files = [ {file = "setuptools-75.6.0-py3-none-any.whl", hash = "sha256:ce74b49e8f7110f9bf04883b730f4765b774ef3ef28f722cce7c273d253aaf7d"}, @@ -8358,7 +8515,7 @@ typing-extensions = {version = ">=4.5.0", markers = "python_version >= \"3.7\""} name = "sympy" version = "1.13.1" description = "Computer algebra system (CAS) in Python" -optional = true +optional = false python-versions = ">=3.8" files = [ {file = "sympy-1.13.1-py3-none-any.whl", hash = "sha256:db36cdc64bf61b9b24578b6f7bab1ecdd2452cf008f34faa33776680c26d66f8"}, @@ -8375,7 +8532,7 @@ dev = ["hypothesis (>=6.70.0)", "pytest (>=7.1.0)"] name = "sympy" version = "1.13.3" description = "Computer algebra system (CAS) in Python" -optional = true +optional = false python-versions = ">=3.8" files = [ {file = "sympy-1.13.3-py3-none-any.whl", hash = "sha256:54612cf55a62755ee71824ce692986f23c88ffa77207b30c1368eda4a7060f73"}, @@ -8669,7 +8826,7 @@ files = [ name = "torch" version = "2.2.1" description = "Tensors and Dynamic neural networks in Python with strong GPU acceleration" -optional = true +optional = false python-versions = ">=3.8.0" files = [ {file = "torch-2.2.1-cp310-cp310-manylinux1_x86_64.whl", hash = "sha256:8d3bad336dd2c93c6bcb3268e8e9876185bda50ebde325ef211fb565c7d15273"}, @@ -8715,7 +8872,7 @@ optree = ["optree (>=0.9.1)"] name = "torch" version = "2.5.1" description = "Tensors and Dynamic neural networks in Python with strong GPU acceleration" -optional = true +optional = false python-versions = ">=3.8.0" files = [ {file = "torch-2.5.1-cp310-cp310-manylinux1_x86_64.whl", hash = "sha256:71328e1bbe39d213b8721678f9dcac30dfc452a46d586f1d514a6aa0a99d4744"}, @@ -9004,7 +9161,7 @@ wsproto = ">=0.14" name = "triton" version = "3.1.0" description = "A language and compiler for custom Deep Learning operations" -optional = true +optional = false python-versions = "*" files = [ {file = "triton-3.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6b0dd10a925263abbe9fa37dcde67a5e9b2383fc269fdf59f5657cac38c5d1d8"}, @@ -10056,13 +10213,13 @@ propcache = ">=0.2.0" [[package]] name = "yt-dlp" -version = "2024.12.6" +version = "2024.12.13" description = "A feature-rich command-line audio/video downloader" optional = true python-versions = ">=3.9" files = [ - {file = "yt_dlp-2024.12.6-py3-none-any.whl", hash = "sha256:a7b8724e58fff4f3204cae4feb936dbd249ca6d22c5f25dec1b3c6f1cb7745a2"}, - {file = "yt_dlp-2024.12.6.tar.gz", hash = "sha256:743dbe081ea871be3f5ff083e2cd95da866dea773fc70ae6b109838cfbf72ac4"}, + {file = "yt_dlp-2024.12.13-py3-none-any.whl", hash = "sha256:5a16b7511e8500cbb13ff0babc9c6deb1e049dc1c854a51738aad2529167fcdf"}, + {file = "yt_dlp-2024.12.13.tar.gz", hash = "sha256:77e15afb9d460ecb7294a39bb5e39dc9f4e8a65f3a37ef4db58800b94d095511"}, ] [package.extras] @@ -10113,4 +10270,4 @@ vector-databases = ["pymilvus", "qdrant-client"] [metadata] lock-version = "2.0" python-versions = ">=3.10,<3.13" -content-hash = "3ad7fa58c20794149695e8c78d160f521a2be93ea0589b487a6250939774b24c" +content-hash = "ac277f57c28fd1a0fbf8cfdbafd06ab0cfafd12b802af03368fd1810f4765408" diff --git a/pyproject.toml b/pyproject.toml index 72e91e25b4..c9952768ef 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,6 +42,7 @@ eval-type-backport = "0.2.0" curl_cffi = "0.6.2" pandoc = "*" pillow = "^10.2.0" +outlines = "^0.1.7" # model-platforms litellm = { version = "^1.38.1", optional = true } From 73ce555845eb0011b2e57a834b4d554699f0f0c1 Mon Sep 17 00:00:00 2001 From: Xiaotian Jin Date: Fri, 13 Dec 2024 16:57:18 +0300 Subject: [PATCH 03/11] update styles --- camel/schemas/outlines_converter.py | 77 +++++++++++-------- .../outlines-converter-example.py | 11 ++- 2 files changed, 51 insertions(+), 37 deletions(-) diff --git a/camel/schemas/outlines_converter.py b/camel/schemas/outlines_converter.py index 6b2b846b4b..77d0edc734 100644 --- a/camel/schemas/outlines_converter.py +++ b/camel/schemas/outlines_converter.py @@ -12,7 +12,7 @@ # limitations under the License. # ========= Copyright 2023-2024 @ CAMEL-AI.org. All Rights Reserved. ========= -from typing import Any, Callable, Dict, List, Optional, Type, Union, Literal +from typing import Any, Callable, List, Literal, Type, Union import outlines from pydantic import BaseModel @@ -33,23 +33,24 @@ class OutlinesConverter(BaseConverter): 4. llamacpp 5. mlx (default: "transformers") - **kwargs: The keyword arguments to be used. See the outlines documentation for more details. - https://dottxt-ai.github.io/outlines/latest/reference/models/models/ + **kwargs: The keyword arguments to be used. See the outlines + documentation for more details. See + https://dottxt-ai.github.io/outlines/latest/reference/models/models/ """ def __init__( - self, - model_type: str, - platform: str = "transformers", - **kwargs: Any + self, model_type: str, platform: str = "transformers", **kwargs: Any ): self.model_type = model_type from outlines import models + match platform: case "vllm": self._outlines_model = models.vllm(model_type, **kwargs) case "transformers": - self._outlines_model = models.transformers(model_type, **kwargs ) + self._outlines_model = models.transformers( + model_type, **kwargs + ) case "mamba": self._outlines_model = models.mamba(model_type, **kwargs) case "llamacpp": @@ -60,7 +61,7 @@ def __init__( raise ValueError(f"Unsupported platform: {platform}") def convert_regex(self, content: str, regex_pattern: str): - r'''Convert the content to the specified regex pattern. + r"""Convert the content to the specified regex pattern. Args: content (str): The content to be converted. @@ -68,16 +69,18 @@ def convert_regex(self, content: str, regex_pattern: str): Returns: str: The converted content. - ''' - regex_generator = outlines.generate.regex(self._outlines_model, regex_pattern) + """ + regex_generator = outlines.generate.regex( + self._outlines_model, regex_pattern + ) return regex_generator(content) def convert_json( - self, - content: str, - output_schema: Union[Type[BaseModel], str, Callable] + self, + content: str, + output_schema: Union[Type[BaseModel], str, Callable], ): - r'''Convert the content to the specified JSON schema. + r"""Convert the content to the specified JSON schema. Args: content (str): The content to be converted. @@ -86,12 +89,14 @@ def convert_json( Returns: str: The converted content. - ''' - json_generator = outlines.generate.json(self._outlines_model, output_schema) + """ + json_generator = outlines.generate.json( + self._outlines_model, output_schema + ) return json_generator(content) def convert_type(self, content: str, type_name: type): - r'''Convert the content to the specified type. + r"""Convert the content to the specified type. The following types are currently available: 1. int @@ -108,12 +113,14 @@ def convert_type(self, content: str, type_name: type): Returns: str: The converted content. - ''' - type_generator = outlines.generate.format(self._outlines_model, type_name) + """ + type_generator = outlines.generate.format( + self._outlines_model, type_name + ) return type_generator(content) def convert_choice(self, content: str, choices: List[str]): - r'''Convert the content to the specified choice. + r"""Convert the content to the specified choice. Args: content (str): The content to be converted. @@ -121,12 +128,14 @@ def convert_choice(self, content: str, choices: List[str]): Returns: str: The converted content. - ''' - choices_generator = outlines.generate.choice(self._outlines_model, choices) + """ + choices_generator = outlines.generate.choice( + self._outlines_model, choices + ) return choices_generator(content) - + def convert_grammar(self, content: str, grammar: str): - r'''Convert the content to the specified grammar. + r"""Convert the content to the specified grammar. Args: content (str): The content to be converted. @@ -134,15 +143,17 @@ def convert_grammar(self, content: str, grammar: str): Returns: str: The converted content. - ''' - grammar_generator = outlines.generate.cfg(self._outlines_model, grammar) + """ + grammar_generator = outlines.generate.cfg( + self._outlines_model, grammar + ) return grammar_generator(content) def convert( # type: ignore[override] self, type: Literal["regex", "json", "type", "choice", "grammar"], content: str, - **kwargs + **kwargs, ) -> BaseModel: r"""Formats the input content into the expected BaseModel @@ -155,14 +166,14 @@ def convert( # type: ignore[override] """ match type: case "regex": - return self.convert_regex(content, kwargs.get("regex_pattern")) + return self.convert_regex(content, kwargs.get("regex_pattern")) # type: ignore[arg-type] case "json": - return self.convert_json(content, kwargs.get("output_schema")) + return self.convert_json(content, kwargs.get("output_schema")) # type: ignore[arg-type] case "type": - return self.convert_type(content, kwargs.get("type_name")) + return self.convert_type(content, kwargs.get("type_name")) # type: ignore[arg-type] case "choice": - return self.convert_choice(content, kwargs.get("choices")) + return self.convert_choice(content, kwargs.get("choices")) # type: ignore[arg-type] case "grammar": - return self.convert_grammar(content, kwargs.get("grammar")) + return self.convert_grammar(content, kwargs.get("grammar")) # type: ignore[arg-type] case _: raise ValueError("Unsupported output schema type") diff --git a/examples/schema_outputs/outlines-converter-example.py b/examples/schema_outputs/outlines-converter-example.py index 253caaef6f..04059ac78b 100644 --- a/examples/schema_outputs/outlines-converter-example.py +++ b/examples/schema_outputs/outlines-converter-example.py @@ -18,14 +18,15 @@ # Define the model using OutlinesConverter model = OutlinesConverter( - model_type="microsoft/Phi-3-mini-4k-instruct", - platform="transformers" + model_type="microsoft/Phi-3-mini-4k-instruct", platform="transformers" ) ######## Regex conversion ######### time_regex_pattern = r"(0?[1-9]|1[0-2]):[0-5]\d\s?(am|pm)?" -output = model.convert_regex("The the best time to visit a dentist is at ", time_regex_pattern) +output = model.convert_regex( + "The the best time to visit a dentist is at ", time_regex_pattern +) print(output) ''' @@ -35,12 +36,14 @@ ######## JSON conversion ######### + # 1. Using a Pydantic model class Temperature(BaseModel): location: str date: str temperature: float + output = model.convert_json( "Today is 2023-09-01, the temperature in Beijing is 30 degrees.", output_schema=Temperature, @@ -126,4 +129,4 @@ class Temperature(BaseModel): print(output) ''' (8-2) -''' \ No newline at end of file +''' From 21e253e4823ffdbdbcf8af472689d1598f6a1d40 Mon Sep 17 00:00:00 2001 From: Xiaotian Jin Date: Sun, 15 Dec 2024 16:46:04 +0300 Subject: [PATCH 04/11] Update camel/schemas/outlines_converter.py Co-authored-by: Harry Ye <116691547+harryeqs@users.noreply.github.com> --- camel/schemas/outlines_converter.py | 34 ++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/camel/schemas/outlines_converter.py b/camel/schemas/outlines_converter.py index 77d0edc734..4e4b002897 100644 --- a/camel/schemas/outlines_converter.py +++ b/camel/schemas/outlines_converter.py @@ -155,15 +155,33 @@ def convert( # type: ignore[override] content: str, **kwargs, ) -> BaseModel: - r"""Formats the input content into the expected BaseModel + r"""Formats the input content into the expected BaseModel. - Args: - content (str): The content to be formatted. - **kwargs: The keyword arguments to be used. - - Returns: - BaseModel: The formatted response. - """ + Args: + type (Literal["regex", "json", "type", "choice", "grammar"]): + The type of conversion to perform. Options are: + - "regex": Match the content against a regex pattern. + - "json": Convert the content into a JSON object based on a schema. + - "type": Convert the content into a specified type. + - "choice": Match the content against a list of valid choices. + - "grammar": Convert the content using a specified grammar. + content (str): The content to be formatted. + **kwargs: Additional keyword arguments specific to the conversion type. + + - For "regex": + regex_pattern (str): The regex pattern to use for matching. + + - For "json": + output_schema (dict): The schema to validate and format the JSON object. + + - For "type": + type_name (str): The target type name for the conversion. + + - For "choice": + choices (List[str]): A list of valid choices to match against. + + - For "grammar": + grammar (str): The grammar definition to use for content conversion. match type: case "regex": return self.convert_regex(content, kwargs.get("regex_pattern")) # type: ignore[arg-type] From 8368a12ba791de709d3e523a5309bb264c41eaa2 Mon Sep 17 00:00:00 2001 From: Xiaotian Jin Date: Sun, 15 Dec 2024 16:51:39 +0300 Subject: [PATCH 05/11] update docs --- camel/schemas/outlines_converter.py | 37 +++++++++++++++++++---------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/camel/schemas/outlines_converter.py b/camel/schemas/outlines_converter.py index 4e4b002897..d96e141967 100644 --- a/camel/schemas/outlines_converter.py +++ b/camel/schemas/outlines_converter.py @@ -39,7 +39,12 @@ class OutlinesConverter(BaseConverter): """ def __init__( - self, model_type: str, platform: str = "transformers", **kwargs: Any + self, + model_type: str, + platform: Literal[ + "vllm", "transformers", "mamba", "llamacpp", "mlx" + ] = "transformers", + **kwargs: Any, ): self.model_type = model_type from outlines import models @@ -157,22 +162,26 @@ def convert( # type: ignore[override] ) -> BaseModel: r"""Formats the input content into the expected BaseModel. - Args: - type (Literal["regex", "json", "type", "choice", "grammar"]): - The type of conversion to perform. Options are: - - "regex": Match the content against a regex pattern. - - "json": Convert the content into a JSON object based on a schema. - - "type": Convert the content into a specified type. - - "choice": Match the content against a list of valid choices. - - "grammar": Convert the content using a specified grammar. - content (str): The content to be formatted. - **kwargs: Additional keyword arguments specific to the conversion type. + Args: + type (Literal["regex", "json", "type", "choice", "grammar"]): + The type of conversion to perform. Options are: + - "regex": Match the content against a regex pattern. + - "json": Convert the content into a JSON object based on + a schema. + - "type": Convert the content into a specified type. + - "choice": Match the content against a list of valid + choices. + - "grammar": Convert the content using a specified grammar. + content (str): The content to be formatted. + **kwargs: Additional keyword arguments specific to the conversion + type. - For "regex": regex_pattern (str): The regex pattern to use for matching. - For "json": - output_schema (dict): The schema to validate and format the JSON object. + output_schema (dict): The schema to validate and format the + JSON object. - For "type": type_name (str): The target type name for the conversion. @@ -181,7 +190,9 @@ def convert( # type: ignore[override] choices (List[str]): A list of valid choices to match against. - For "grammar": - grammar (str): The grammar definition to use for content conversion. + grammar (str): The grammar definition to use for content + conversion. + """ match type: case "regex": return self.convert_regex(content, kwargs.get("regex_pattern")) # type: ignore[arg-type] From f7e3448f26d8b200223cf8f485a8665b9ee375bc Mon Sep 17 00:00:00 2001 From: Xiaotian Jin Date: Mon, 16 Dec 2024 18:33:09 +0300 Subject: [PATCH 06/11] split convert_json into convert_json and convert_pydantic --- camel/schemas/outlines_converter.py | 52 +++++++++++++++---- .../outlines-converter-example.py | 49 ++++++++++++++--- 2 files changed, 82 insertions(+), 19 deletions(-) diff --git a/camel/schemas/outlines_converter.py b/camel/schemas/outlines_converter.py index d96e141967..c6c6eb06f2 100644 --- a/camel/schemas/outlines_converter.py +++ b/camel/schemas/outlines_converter.py @@ -83,17 +83,38 @@ def convert_regex(self, content: str, regex_pattern: str): def convert_json( self, content: str, - output_schema: Union[Type[BaseModel], str, Callable], - ): - r"""Convert the content to the specified JSON schema. + output_schema: Union[str, Callable], + ) -> dict: + r"""Convert the content to the specified JSON schema given by + output_schema. Args: content (str): The content to be converted. - output_schema (Union[Type[BaseModel], str, Callable]): The expected - format of the response. + output_schema (Union[str, Callable]): The expected format of the + response. Returns: - str: The converted content. + dict: The converted content in JSON format. + """ + json_generator = outlines.generate.json( + self._outlines_model, output_schema + ) + return json_generator(content) + + def convert_pydantic( + self, + content: str, + output_schema: Type[BaseModel], + ) -> BaseModel: + r"""Convert the content to the specified Pydantic schema. + + Args: + content (str): The content to be converted. + output_schema (Type[BaseModel]): The expected format of the + response. + + Returns: + BaseModel: The converted content in pydantic model format. """ json_generator = outlines.generate.json( self._outlines_model, output_schema @@ -159,15 +180,16 @@ def convert( # type: ignore[override] type: Literal["regex", "json", "type", "choice", "grammar"], content: str, **kwargs, - ) -> BaseModel: + ): r"""Formats the input content into the expected BaseModel. Args: type (Literal["regex", "json", "type", "choice", "grammar"]): The type of conversion to perform. Options are: - "regex": Match the content against a regex pattern. - - "json": Convert the content into a JSON object based on - a schema. + - "pydantic": Convert the content into a pydantic model. + - "json": Convert the content into a JSON based on a + schema. - "type": Convert the content into a specified type. - "choice": Match the content against a list of valid choices. @@ -179,9 +201,13 @@ def convert( # type: ignore[override] - For "regex": regex_pattern (str): The regex pattern to use for matching. + - For "pydantic": + output_schema (Type[BaseModel]): The schema to validate and + format the pydantic model. + - For "json": - output_schema (dict): The schema to validate and format the - JSON object. + output_schema (Union[str, Callable]): The schema to validate + and format the JSON object. - For "type": type_name (str): The target type name for the conversion. @@ -196,6 +222,10 @@ def convert( # type: ignore[override] match type: case "regex": return self.convert_regex(content, kwargs.get("regex_pattern")) # type: ignore[arg-type] + case "pydantic": + return self.convert_pydantic( + content, kwargs.get("output_schema") + ) # type: ignore[arg-type] case "json": return self.convert_json(content, kwargs.get("output_schema")) # type: ignore[arg-type] case "type": diff --git a/examples/schema_outputs/outlines-converter-example.py b/examples/schema_outputs/outlines-converter-example.py index 04059ac78b..1053486a5a 100644 --- a/examples/schema_outputs/outlines-converter-example.py +++ b/examples/schema_outputs/outlines-converter-example.py @@ -34,27 +34,35 @@ ''' -######## JSON conversion ######### +######## Pydantic conversion ######### -# 1. Using a Pydantic model +# Using a Pydantic model class Temperature(BaseModel): location: str date: str temperature: float -output = model.convert_json( +output = model.convert_pydantic( "Today is 2023-09-01, the temperature in Beijing is 30 degrees.", output_schema=Temperature, ) +print(type(output)) +''' + +''' print(output) ''' location='Beijing' date='2023-09-01' temperature=30.0 ''' -# 2. Using a JSON schema + +######## JSON conversion ######### + +# 1. Using a JSON schema + schema = """ { "title": "User", @@ -72,14 +80,39 @@ class Temperature(BaseModel): "Create a user profile with the fields name, last_name and id", output_schema=schema, ) - +print(type(output)) +''' + +''' print(output) ''' {'name': 'John', 'last_name': 'Doe', 'id': 123456} ''' +# 2. Using a function (Callable) + + +def get_temperature(location: str, date: str, temperature: float): + print(f"Temperature in {location} on {date} is {temperature} degrees.") + + +output = model.convert_json( + "Today is 2023-09-01, the temperature in Beijing is 30 degrees.", + output_schema=get_temperature, +) + +print(type(output)) +''' + +''' +print(output) +''' +{'location': 'Beijing', 'date': '2023-09-01', 'temperature': 30} +''' + + +######## Type constraints ######### -####### Type constraints ####### output = model.convert_type( "When I was 6 my sister was half my age. Now I'm 70 how old is my sister?", int, @@ -91,7 +124,7 @@ class Temperature(BaseModel): ''' -####### Mutliple choices ####### +######## Mutliple choices ######### output = model.convert_choice( "What is the capital of Spain?", @@ -104,7 +137,7 @@ class Temperature(BaseModel): ''' -####### Grammer ####### +######## Grammer ######### arithmetic_grammar = """ ?start: expression From ca34a23be9210e83c1aac929099e0fc21d381de4 Mon Sep 17 00:00:00 2001 From: Xiaotian Jin Date: Mon, 16 Dec 2024 18:47:16 +0300 Subject: [PATCH 07/11] add Try catch in all methods --- camel/schemas/outlines_converter.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/camel/schemas/outlines_converter.py b/camel/schemas/outlines_converter.py index c6c6eb06f2..8d9c1adab1 100644 --- a/camel/schemas/outlines_converter.py +++ b/camel/schemas/outlines_converter.py @@ -20,6 +20,18 @@ from .base import BaseConverter +# Decorator to add try catch for all the methods +def exception_handler_decorator(func): + def wrapper(*args, **kwargs): + try: + return func(*args, **kwargs) + except Exception as e: + print(f"Error in {func.__name__}: {e}") + raise e + + return wrapper + + class OutlinesConverter(BaseConverter): r"""OutlinesConverter is a class that converts a string or a function into a BaseModel schema. @@ -65,6 +77,7 @@ def __init__( case _: raise ValueError(f"Unsupported platform: {platform}") + @exception_handler_decorator def convert_regex(self, content: str, regex_pattern: str): r"""Convert the content to the specified regex pattern. @@ -80,6 +93,7 @@ def convert_regex(self, content: str, regex_pattern: str): ) return regex_generator(content) + @exception_handler_decorator def convert_json( self, content: str, @@ -101,6 +115,7 @@ def convert_json( ) return json_generator(content) + @exception_handler_decorator def convert_pydantic( self, content: str, @@ -121,6 +136,7 @@ def convert_pydantic( ) return json_generator(content) + @exception_handler_decorator def convert_type(self, content: str, type_name: type): r"""Convert the content to the specified type. @@ -145,6 +161,7 @@ def convert_type(self, content: str, type_name: type): ) return type_generator(content) + @exception_handler_decorator def convert_choice(self, content: str, choices: List[str]): r"""Convert the content to the specified choice. @@ -160,6 +177,7 @@ def convert_choice(self, content: str, choices: List[str]): ) return choices_generator(content) + @exception_handler_decorator def convert_grammar(self, content: str, grammar: str): r"""Convert the content to the specified grammar. From 185d574a6ec21f2e9cad36bb54c60d9625bcd0fb Mon Sep 17 00:00:00 2001 From: Xiaotian Jin Date: Mon, 16 Dec 2024 19:31:34 +0300 Subject: [PATCH 08/11] remove exception handler decorators --- camel/schemas/outlines_converter.py | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/camel/schemas/outlines_converter.py b/camel/schemas/outlines_converter.py index 8d9c1adab1..c6c6eb06f2 100644 --- a/camel/schemas/outlines_converter.py +++ b/camel/schemas/outlines_converter.py @@ -20,18 +20,6 @@ from .base import BaseConverter -# Decorator to add try catch for all the methods -def exception_handler_decorator(func): - def wrapper(*args, **kwargs): - try: - return func(*args, **kwargs) - except Exception as e: - print(f"Error in {func.__name__}: {e}") - raise e - - return wrapper - - class OutlinesConverter(BaseConverter): r"""OutlinesConverter is a class that converts a string or a function into a BaseModel schema. @@ -77,7 +65,6 @@ def __init__( case _: raise ValueError(f"Unsupported platform: {platform}") - @exception_handler_decorator def convert_regex(self, content: str, regex_pattern: str): r"""Convert the content to the specified regex pattern. @@ -93,7 +80,6 @@ def convert_regex(self, content: str, regex_pattern: str): ) return regex_generator(content) - @exception_handler_decorator def convert_json( self, content: str, @@ -115,7 +101,6 @@ def convert_json( ) return json_generator(content) - @exception_handler_decorator def convert_pydantic( self, content: str, @@ -136,7 +121,6 @@ def convert_pydantic( ) return json_generator(content) - @exception_handler_decorator def convert_type(self, content: str, type_name: type): r"""Convert the content to the specified type. @@ -161,7 +145,6 @@ def convert_type(self, content: str, type_name: type): ) return type_generator(content) - @exception_handler_decorator def convert_choice(self, content: str, choices: List[str]): r"""Convert the content to the specified choice. @@ -177,7 +160,6 @@ def convert_choice(self, content: str, choices: List[str]): ) return choices_generator(content) - @exception_handler_decorator def convert_grammar(self, content: str, grammar: str): r"""Convert the content to the specified grammar. From 0fee0ae9a5cd660ae6a6a812bb2bf211ebf8236c Mon Sep 17 00:00:00 2001 From: Xiaotian Jin Date: Tue, 17 Dec 2024 14:08:09 +0300 Subject: [PATCH 09/11] update outlines as optional --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 0e4d9b8a57..a6b15bca15 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,7 +42,6 @@ eval-type-backport = "0.2.0" curl_cffi = "0.6.2" pandoc = "*" pillow = "^10.2.0" -outlines = "^0.1.7" # model-platforms litellm = { version = "^1.38.1", optional = true } @@ -68,6 +67,7 @@ sentencepiece = { version = "^0", optional = true } opencv-python = { version = "^4", optional = true } # tools +outlines = { version = "^0.1.7", optional = true } beautifulsoup4 = { version = "^4", optional = true } docx2txt = { version = "^0.8", optional = true } PyMuPDF = { version = "^1.22.5", optional = true } From 9f09fd70f8f31504c29dc7bfda39838e871c764c Mon Sep 17 00:00:00 2001 From: Xiaotian Jin Date: Tue, 17 Dec 2024 14:10:12 +0300 Subject: [PATCH 10/11] fix example style --- .../outlines-converter-example.py | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/examples/schema_outputs/outlines-converter-example.py b/examples/schema_outputs/outlines-converter-example.py index 1053486a5a..9fa01dcd4c 100644 --- a/examples/schema_outputs/outlines-converter-example.py +++ b/examples/schema_outputs/outlines-converter-example.py @@ -30,7 +30,9 @@ print(output) ''' +=============================================================================== 6:00 pm +=============================================================================== ''' @@ -51,11 +53,15 @@ class Temperature(BaseModel): print(type(output)) ''' +=============================================================================== +=============================================================================== ''' print(output) ''' +=============================================================================== location='Beijing' date='2023-09-01' temperature=30.0 +=============================================================================== ''' @@ -82,11 +88,15 @@ class Temperature(BaseModel): ) print(type(output)) ''' +=============================================================================== +=============================================================================== ''' print(output) ''' +=============================================================================== {'name': 'John', 'last_name': 'Doe', 'id': 123456} +=============================================================================== ''' # 2. Using a function (Callable) @@ -103,11 +113,15 @@ def get_temperature(location: str, date: str, temperature: float): print(type(output)) ''' +=============================================================================== +=============================================================================== ''' print(output) ''' +=============================================================================== {'location': 'Beijing', 'date': '2023-09-01', 'temperature': 30} +=============================================================================== ''' @@ -120,7 +134,9 @@ def get_temperature(location: str, date: str, temperature: float): print(output) ''' +=============================================================================== 35 +=============================================================================== ''' @@ -133,7 +149,9 @@ def get_temperature(location: str, date: str, temperature: float): print(output) ''' +=============================================================================== Madrid +=============================================================================== ''' @@ -161,5 +179,7 @@ def get_temperature(location: str, date: str, temperature: float): print(output) ''' +=============================================================================== (8-2) +=============================================================================== ''' From 87ccb62505dedd621d3cf4fbdfb8caf6c415c613 Mon Sep 17 00:00:00 2001 From: Wendong Date: Wed, 18 Dec 2024 00:42:51 +0800 Subject: [PATCH 11/11] small enhancement based on review comment --- camel/schemas/base.py | 6 +- camel/schemas/outlines_converter.py | 25 +- ...ample.py => outlines_converter_example.py} | 40 +-- poetry.lock | 305 +++++++++--------- pyproject.toml | 2 + 5 files changed, 189 insertions(+), 189 deletions(-) rename examples/schema_outputs/{outlines-converter-example.py => outlines_converter_example.py} (98%) diff --git a/camel/schemas/base.py b/camel/schemas/base.py index d8ad9a0c80..09e5efc58c 100644 --- a/camel/schemas/base.py +++ b/camel/schemas/base.py @@ -15,8 +15,6 @@ from abc import ABC, abstractmethod from typing import Any, Dict -from pydantic import BaseModel - class BaseConverter(ABC): r"""A base class for schema outputs that includes functionality @@ -30,7 +28,7 @@ class BaseConverter(ABC): @abstractmethod def convert( self, content: str, *args: Any, **kwargs: Dict[str, Any] - ) -> BaseModel: + ) -> Any: r"""Structures the input text into the expected response format. Args: @@ -40,6 +38,6 @@ def convert( prompt (Optional[str], optional): The prompt to be used. Returns: - Optional[BaseModel]: The structured response. + Any: The converted response. """ pass diff --git a/camel/schemas/outlines_converter.py b/camel/schemas/outlines_converter.py index c6c6eb06f2..85d33564ec 100644 --- a/camel/schemas/outlines_converter.py +++ b/camel/schemas/outlines_converter.py @@ -14,7 +14,6 @@ from typing import Any, Callable, List, Literal, Type, Union -import outlines from pydantic import BaseModel from .base import BaseConverter @@ -65,7 +64,7 @@ def __init__( case _: raise ValueError(f"Unsupported platform: {platform}") - def convert_regex(self, content: str, regex_pattern: str): + def convert_regex(self, content: str, regex_pattern: str) -> str: r"""Convert the content to the specified regex pattern. Args: @@ -75,6 +74,8 @@ def convert_regex(self, content: str, regex_pattern: str): Returns: str: The converted content. """ + import outlines + regex_generator = outlines.generate.regex( self._outlines_model, regex_pattern ) @@ -96,6 +97,8 @@ def convert_json( Returns: dict: The converted content in JSON format. """ + import outlines + json_generator = outlines.generate.json( self._outlines_model, output_schema ) @@ -116,12 +119,14 @@ def convert_pydantic( Returns: BaseModel: The converted content in pydantic model format. """ + import outlines + json_generator = outlines.generate.json( self._outlines_model, output_schema ) return json_generator(content) - def convert_type(self, content: str, type_name: type): + def convert_type(self, content: str, type_name: type) -> str: r"""Convert the content to the specified type. The following types are currently available: @@ -140,12 +145,14 @@ def convert_type(self, content: str, type_name: type): Returns: str: The converted content. """ + import outlines + type_generator = outlines.generate.format( self._outlines_model, type_name ) return type_generator(content) - def convert_choice(self, content: str, choices: List[str]): + def convert_choice(self, content: str, choices: List[str]) -> str: r"""Convert the content to the specified choice. Args: @@ -155,12 +162,14 @@ def convert_choice(self, content: str, choices: List[str]): Returns: str: The converted content. """ + import outlines + choices_generator = outlines.generate.choice( self._outlines_model, choices ) return choices_generator(content) - def convert_grammar(self, content: str, grammar: str): + def convert_grammar(self, content: str, grammar: str) -> str: r"""Convert the content to the specified grammar. Args: @@ -170,6 +179,8 @@ def convert_grammar(self, content: str, grammar: str): Returns: str: The converted content. """ + import outlines + grammar_generator = outlines.generate.cfg( self._outlines_model, grammar ) @@ -177,10 +188,10 @@ def convert_grammar(self, content: str, grammar: str): def convert( # type: ignore[override] self, - type: Literal["regex", "json", "type", "choice", "grammar"], content: str, + type: Literal["regex", "json", "type", "choice", "grammar"], **kwargs, - ): + ) -> Any: r"""Formats the input content into the expected BaseModel. Args: diff --git a/examples/schema_outputs/outlines-converter-example.py b/examples/schema_outputs/outlines_converter_example.py similarity index 98% rename from examples/schema_outputs/outlines-converter-example.py rename to examples/schema_outputs/outlines_converter_example.py index 9fa01dcd4c..107473b81c 100644 --- a/examples/schema_outputs/outlines-converter-example.py +++ b/examples/schema_outputs/outlines_converter_example.py @@ -29,11 +29,11 @@ ) print(output) -''' +""" =============================================================================== 6:00 pm =============================================================================== -''' +""" ######## Pydantic conversion ######### @@ -52,17 +52,17 @@ class Temperature(BaseModel): ) print(type(output)) -''' +""" =============================================================================== =============================================================================== -''' +""" print(output) -''' +""" =============================================================================== location='Beijing' date='2023-09-01' temperature=30.0 =============================================================================== -''' +""" ######## JSON conversion ######### @@ -87,17 +87,17 @@ class Temperature(BaseModel): output_schema=schema, ) print(type(output)) -''' +""" =============================================================================== =============================================================================== -''' +""" print(output) -''' +""" =============================================================================== {'name': 'John', 'last_name': 'Doe', 'id': 123456} =============================================================================== -''' +""" # 2. Using a function (Callable) @@ -112,17 +112,17 @@ def get_temperature(location: str, date: str, temperature: float): ) print(type(output)) -''' +""" =============================================================================== =============================================================================== -''' +""" print(output) -''' +""" =============================================================================== {'location': 'Beijing', 'date': '2023-09-01', 'temperature': 30} =============================================================================== -''' +""" ######## Type constraints ######### @@ -133,11 +133,11 @@ def get_temperature(location: str, date: str, temperature: float): ) print(output) -''' +""" =============================================================================== 35 =============================================================================== -''' +""" ######## Mutliple choices ######### @@ -148,11 +148,11 @@ def get_temperature(location: str, date: str, temperature: float): ) print(output) -''' +""" =============================================================================== Madrid =============================================================================== -''' +""" ######## Grammer ######### @@ -178,8 +178,8 @@ def get_temperature(location: str, date: str, temperature: float): ) print(output) -''' +""" =============================================================================== (8-2) =============================================================================== -''' +""" diff --git a/poetry.lock b/poetry.lock index 05c47a4b72..9d347809fd 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.4 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.5 and should not be changed by hand. [[package]] name = "accelerate" @@ -195,13 +195,13 @@ speedups = ["Brotli", "aiodns (>=3.2.0)", "brotlicffi"] [[package]] name = "aiosignal" -version = "1.3.1" +version = "1.3.2" description = "aiosignal: a list of registered asynchronous callbacks" optional = true -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "aiosignal-1.3.1-py3-none-any.whl", hash = "sha256:f8376fb07dd1e86a584e4fcdec80b36b7f81aac666ebc724e2c090300dd83b17"}, - {file = "aiosignal-1.3.1.tar.gz", hash = "sha256:54cd96e15e1649b75d6c87526a6ff0b6c1b0dd3459f43d9ca11d48c339b68cfc"}, + {file = "aiosignal-1.3.2-py2.py3-none-any.whl", hash = "sha256:45cde58e409a301715980c2b01d0c28bdde3770d8290b5eb2173759d9acb31a5"}, + {file = "aiosignal-1.3.2.tar.gz", hash = "sha256:a8c255c66fafb1e499c9351d0bf32ff2d8a0321595ebac3b93713656d2436f54"}, ] [package.dependencies] @@ -211,7 +211,7 @@ frozenlist = ">=1.1.0" name = "airportsdata" version = "20241001" description = "Extensive database of location and timezone data for nearly every airport and landing strip in the world." -optional = false +optional = true python-versions = ">=3.9" files = [ {file = "airportsdata-20241001-py3-none-any.whl", hash = "sha256:67d71cf2c5378cc17ff66b62b1e11aa2444043949c894543ac8fd8dafce192fd"}, @@ -474,19 +474,19 @@ files = [ [[package]] name = "attrs" -version = "24.2.0" +version = "24.3.0" description = "Classes Without Boilerplate" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "attrs-24.2.0-py3-none-any.whl", hash = "sha256:81921eb96de3191c8258c199618104dd27ac608d9366f5e35d011eae1867ede2"}, - {file = "attrs-24.2.0.tar.gz", hash = "sha256:5cfb1b9148b5b086569baec03f20d7b6bf3bcacc9a42bebf87ffaaca362f6346"}, + {file = "attrs-24.3.0-py3-none-any.whl", hash = "sha256:ac96cd038792094f438ad1f6ff80837353805ac950cd2aa0e0625ef19850c308"}, + {file = "attrs-24.3.0.tar.gz", hash = "sha256:8f5c07333d543103541ba7be0e2ce16eeee8130cb0b3f9238ab904ce1e85baff"}, ] [package.extras] benchmark = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pympler", "pytest (>=4.3.0)", "pytest-codspeed", "pytest-mypy-plugins", "pytest-xdist[psutil]"] cov = ["cloudpickle", "coverage[toml] (>=5.3)", "hypothesis", "mypy (>=1.11.1)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] -dev = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pre-commit", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] +dev = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pre-commit-uv", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] docs = ["cogapp", "furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier (<24.7)"] tests = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] tests-mypy = ["mypy (>=1.11.1)", "pytest-mypy-plugins"] @@ -675,13 +675,13 @@ css = ["tinycss2 (>=1.1.0,<1.5)"] [[package]] name = "botocore" -version = "1.35.80" +version = "1.35.82" description = "Low-level, data-driven core of boto 3." optional = true python-versions = ">=3.8" files = [ - {file = "botocore-1.35.80-py3-none-any.whl", hash = "sha256:36e589dccb62380abd628b08fecfa2f7c89b99f41ec9fc42c467c94008c0be4a"}, - {file = "botocore-1.35.80.tar.gz", hash = "sha256:b8dfceca58891cb2711bd6455ec4f7159051f3796e0f64adef9bb334f19d8a92"}, + {file = "botocore-1.35.82-py3-none-any.whl", hash = "sha256:e43b97d8cbf19d35ce3a177f144bd97cc370f0a67d0984c7d7cf105ac198748f"}, + {file = "botocore-1.35.82.tar.gz", hash = "sha256:78dd7bf8f49616d00073698d7bbaf5a115208fe730b7b7afae4456adddb3552e"}, ] [package.dependencies] @@ -705,13 +705,13 @@ files = [ [[package]] name = "certifi" -version = "2024.8.30" +version = "2024.12.14" description = "Python package for providing Mozilla's CA Bundle." optional = false python-versions = ">=3.6" files = [ - {file = "certifi-2024.8.30-py3-none-any.whl", hash = "sha256:922820b53db7a7257ffbda3f597266d435245903d80737e34f8a45ff3e3230d8"}, - {file = "certifi-2024.8.30.tar.gz", hash = "sha256:bec941d2aa8195e248a60b31ff9f0558284cf01a52591ceda73ea9afffd69fd9"}, + {file = "certifi-2024.12.14-py3-none-any.whl", hash = "sha256:1275f7a45be9464efc1173084eaa30f866fe2e47d389406136d332ed4967ec56"}, + {file = "certifi-2024.12.14.tar.gz", hash = "sha256:b650d30f370c2b724812bee08008be0c4163b163ddaec3f2546c1caf65f191db"}, ] [[package]] @@ -947,7 +947,7 @@ colorama = {version = "*", markers = "platform_system == \"Windows\""} name = "cloudpickle" version = "3.1.0" description = "Pickler class to extend the standard pickle.Pickler functionality" -optional = false +optional = true python-versions = ">=3.8" files = [ {file = "cloudpickle-3.1.0-py3-none-any.whl", hash = "sha256:fe11acda67f61aaaec473e3afe030feb131d78a43461b718185363384f1ba12e"}, @@ -1369,37 +1369,37 @@ vision = ["Pillow (>=6.2.1)"] [[package]] name = "debugpy" -version = "1.8.9" +version = "1.8.11" description = "An implementation of the Debug Adapter Protocol for Python" optional = true python-versions = ">=3.8" files = [ - {file = "debugpy-1.8.9-cp310-cp310-macosx_14_0_x86_64.whl", hash = "sha256:cfe1e6c6ad7178265f74981edf1154ffce97b69005212fbc90ca22ddfe3d017e"}, - {file = "debugpy-1.8.9-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ada7fb65102a4d2c9ab62e8908e9e9f12aed9d76ef44880367bc9308ebe49a0f"}, - {file = "debugpy-1.8.9-cp310-cp310-win32.whl", hash = "sha256:c36856343cbaa448171cba62a721531e10e7ffb0abff838004701454149bc037"}, - {file = "debugpy-1.8.9-cp310-cp310-win_amd64.whl", hash = "sha256:17c5e0297678442511cf00a745c9709e928ea4ca263d764e90d233208889a19e"}, - {file = "debugpy-1.8.9-cp311-cp311-macosx_14_0_universal2.whl", hash = "sha256:b74a49753e21e33e7cf030883a92fa607bddc4ede1aa4145172debc637780040"}, - {file = "debugpy-1.8.9-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:62d22dacdb0e296966d7d74a7141aaab4bec123fa43d1a35ddcb39bf9fd29d70"}, - {file = "debugpy-1.8.9-cp311-cp311-win32.whl", hash = "sha256:8138efff315cd09b8dcd14226a21afda4ca582284bf4215126d87342bba1cc66"}, - {file = "debugpy-1.8.9-cp311-cp311-win_amd64.whl", hash = "sha256:ff54ef77ad9f5c425398efb150239f6fe8e20c53ae2f68367eba7ece1e96226d"}, - {file = "debugpy-1.8.9-cp312-cp312-macosx_14_0_universal2.whl", hash = "sha256:957363d9a7a6612a37458d9a15e72d03a635047f946e5fceee74b50d52a9c8e2"}, - {file = "debugpy-1.8.9-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5e565fc54b680292b418bb809f1386f17081d1346dca9a871bf69a8ac4071afe"}, - {file = "debugpy-1.8.9-cp312-cp312-win32.whl", hash = "sha256:3e59842d6c4569c65ceb3751075ff8d7e6a6ada209ceca6308c9bde932bcef11"}, - {file = "debugpy-1.8.9-cp312-cp312-win_amd64.whl", hash = "sha256:66eeae42f3137eb428ea3a86d4a55f28da9bd5a4a3d369ba95ecc3a92c1bba53"}, - {file = "debugpy-1.8.9-cp313-cp313-macosx_14_0_universal2.whl", hash = "sha256:957ecffff80d47cafa9b6545de9e016ae8c9547c98a538ee96ab5947115fb3dd"}, - {file = "debugpy-1.8.9-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1efbb3ff61487e2c16b3e033bc8595aea578222c08aaf3c4bf0f93fadbd662ee"}, - {file = "debugpy-1.8.9-cp313-cp313-win32.whl", hash = "sha256:7c4d65d03bee875bcb211c76c1d8f10f600c305dbd734beaed4077e902606fee"}, - {file = "debugpy-1.8.9-cp313-cp313-win_amd64.whl", hash = "sha256:e46b420dc1bea64e5bbedd678148be512442bc589b0111bd799367cde051e71a"}, - {file = "debugpy-1.8.9-cp38-cp38-macosx_14_0_x86_64.whl", hash = "sha256:472a3994999fe6c0756945ffa359e9e7e2d690fb55d251639d07208dbc37caea"}, - {file = "debugpy-1.8.9-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:365e556a4772d7d0d151d7eb0e77ec4db03bcd95f26b67b15742b88cacff88e9"}, - {file = "debugpy-1.8.9-cp38-cp38-win32.whl", hash = "sha256:54a7e6d3014c408eb37b0b06021366ee985f1539e12fe49ca2ee0d392d9ceca5"}, - {file = "debugpy-1.8.9-cp38-cp38-win_amd64.whl", hash = "sha256:8e99c0b1cc7bf86d83fb95d5ccdc4ad0586d4432d489d1f54e4055bcc795f693"}, - {file = "debugpy-1.8.9-cp39-cp39-macosx_14_0_x86_64.whl", hash = "sha256:7e8b079323a56f719977fde9d8115590cb5e7a1cba2fcee0986ef8817116e7c1"}, - {file = "debugpy-1.8.9-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6953b335b804a41f16a192fa2e7851bdcfd92173cbb2f9f777bb934f49baab65"}, - {file = "debugpy-1.8.9-cp39-cp39-win32.whl", hash = "sha256:7e646e62d4602bb8956db88b1e72fe63172148c1e25c041e03b103a25f36673c"}, - {file = "debugpy-1.8.9-cp39-cp39-win_amd64.whl", hash = "sha256:3d9755e77a2d680ce3d2c5394a444cf42be4a592caaf246dbfbdd100ffcf7ae5"}, - {file = "debugpy-1.8.9-py2.py3-none-any.whl", hash = "sha256:cc37a6c9987ad743d9c3a14fa1b1a14b7e4e6041f9dd0c8abf8895fe7a97b899"}, - {file = "debugpy-1.8.9.zip", hash = "sha256:1339e14c7d980407248f09824d1b25ff5c5616651689f1e0f0e51bdead3ea13e"}, + {file = "debugpy-1.8.11-cp310-cp310-macosx_14_0_x86_64.whl", hash = "sha256:2b26fefc4e31ff85593d68b9022e35e8925714a10ab4858fb1b577a8a48cb8cd"}, + {file = "debugpy-1.8.11-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:61bc8b3b265e6949855300e84dc93d02d7a3a637f2aec6d382afd4ceb9120c9f"}, + {file = "debugpy-1.8.11-cp310-cp310-win32.whl", hash = "sha256:c928bbf47f65288574b78518449edaa46c82572d340e2750889bbf8cd92f3737"}, + {file = "debugpy-1.8.11-cp310-cp310-win_amd64.whl", hash = "sha256:8da1db4ca4f22583e834dcabdc7832e56fe16275253ee53ba66627b86e304da1"}, + {file = "debugpy-1.8.11-cp311-cp311-macosx_14_0_universal2.whl", hash = "sha256:85de8474ad53ad546ff1c7c7c89230db215b9b8a02754d41cb5a76f70d0be296"}, + {file = "debugpy-1.8.11-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8ffc382e4afa4aee367bf413f55ed17bd91b191dcaf979890af239dda435f2a1"}, + {file = "debugpy-1.8.11-cp311-cp311-win32.whl", hash = "sha256:40499a9979c55f72f4eb2fc38695419546b62594f8af194b879d2a18439c97a9"}, + {file = "debugpy-1.8.11-cp311-cp311-win_amd64.whl", hash = "sha256:987bce16e86efa86f747d5151c54e91b3c1e36acc03ce1ddb50f9d09d16ded0e"}, + {file = "debugpy-1.8.11-cp312-cp312-macosx_14_0_universal2.whl", hash = "sha256:84e511a7545d11683d32cdb8f809ef63fc17ea2a00455cc62d0a4dbb4ed1c308"}, + {file = "debugpy-1.8.11-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ce291a5aca4985d82875d6779f61375e959208cdf09fcec40001e65fb0a54768"}, + {file = "debugpy-1.8.11-cp312-cp312-win32.whl", hash = "sha256:28e45b3f827d3bf2592f3cf7ae63282e859f3259db44ed2b129093ca0ac7940b"}, + {file = "debugpy-1.8.11-cp312-cp312-win_amd64.whl", hash = "sha256:44b1b8e6253bceada11f714acf4309ffb98bfa9ac55e4fce14f9e5d4484287a1"}, + {file = "debugpy-1.8.11-cp313-cp313-macosx_14_0_universal2.whl", hash = "sha256:8988f7163e4381b0da7696f37eec7aca19deb02e500245df68a7159739bbd0d3"}, + {file = "debugpy-1.8.11-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c1f6a173d1140e557347419767d2b14ac1c9cd847e0b4c5444c7f3144697e4e"}, + {file = "debugpy-1.8.11-cp313-cp313-win32.whl", hash = "sha256:bb3b15e25891f38da3ca0740271e63ab9db61f41d4d8541745cfc1824252cb28"}, + {file = "debugpy-1.8.11-cp313-cp313-win_amd64.whl", hash = "sha256:d8768edcbeb34da9e11bcb8b5c2e0958d25218df7a6e56adf415ef262cd7b6d1"}, + {file = "debugpy-1.8.11-cp38-cp38-macosx_14_0_x86_64.whl", hash = "sha256:ad7efe588c8f5cf940f40c3de0cd683cc5b76819446abaa50dc0829a30c094db"}, + {file = "debugpy-1.8.11-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:189058d03a40103a57144752652b3ab08ff02b7595d0ce1f651b9acc3a3a35a0"}, + {file = "debugpy-1.8.11-cp38-cp38-win32.whl", hash = "sha256:32db46ba45849daed7ccf3f2e26f7a386867b077f39b2a974bb5c4c2c3b0a280"}, + {file = "debugpy-1.8.11-cp38-cp38-win_amd64.whl", hash = "sha256:116bf8342062246ca749013df4f6ea106f23bc159305843491f64672a55af2e5"}, + {file = "debugpy-1.8.11-cp39-cp39-macosx_14_0_x86_64.whl", hash = "sha256:654130ca6ad5de73d978057eaf9e582244ff72d4574b3e106fb8d3d2a0d32458"}, + {file = "debugpy-1.8.11-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:23dc34c5e03b0212fa3c49a874df2b8b1b8fda95160bd79c01eb3ab51ea8d851"}, + {file = "debugpy-1.8.11-cp39-cp39-win32.whl", hash = "sha256:52d8a3166c9f2815bfae05f386114b0b2d274456980d41f320299a8d9a5615a7"}, + {file = "debugpy-1.8.11-cp39-cp39-win_amd64.whl", hash = "sha256:52c3cf9ecda273a19cc092961ee34eb9ba8687d67ba34cc7b79a521c1c64c4c0"}, + {file = "debugpy-1.8.11-py2.py3-none-any.whl", hash = "sha256:0e22f846f4211383e6a416d04b4c13ed174d24cc5d43f5fd52e7821d0ebc8920"}, + {file = "debugpy-1.8.11.tar.gz", hash = "sha256:6ad2688b69235c43b020e04fecccdf6a96c8943ca9c2fb340b8adc103c655e57"}, ] [[package]] @@ -1509,7 +1509,7 @@ voice = ["PyNaCl (>=1.3.0,<1.6)"] name = "diskcache" version = "5.6.3" description = "Disk Cache -- Disk and file backed persistent cache." -optional = false +optional = true python-versions = ">=3" files = [ {file = "diskcache-5.6.3-py3-none-any.whl", hash = "sha256:5e31b2d5fbad117cc363ebaf6b689474db18a1f6438bc82358b024abd4c2ca19"}, @@ -2778,13 +2778,13 @@ files = [ [[package]] name = "huggingface-hub" -version = "0.26.5" +version = "0.27.0" description = "Client library to download and publish models, datasets and other repos on the huggingface.co hub" optional = false python-versions = ">=3.8.0" files = [ - {file = "huggingface_hub-0.26.5-py3-none-any.whl", hash = "sha256:fb7386090bbe892072e64b85f7c4479fd2d65eea5f2543327c970d5169e83924"}, - {file = "huggingface_hub-0.26.5.tar.gz", hash = "sha256:1008bd18f60bfb65e8dbc0a97249beeeaa8c99d3c2fa649354df9fa5a13ed83b"}, + {file = "huggingface_hub-0.27.0-py3-none-any.whl", hash = "sha256:8f2e834517f1f1ddf1ecc716f91b120d7333011b7485f665a9a412eacb1a2a81"}, + {file = "huggingface_hub-0.27.0.tar.gz", hash = "sha256:902cce1a1be5739f5589e560198a65a8edcfd3b830b1666f36e4b961f0454fac"}, ] [package.dependencies] @@ -2961,7 +2961,7 @@ files = [ name = "interegular" version = "0.3.3" description = "a regex intersection checker" -optional = false +optional = true python-versions = ">=3.7" files = [ {file = "interegular-0.3.3-py37-none-any.whl", hash = "sha256:b0c07007d48c89d6d19f7204972d369b2a77222722e126b6aa63aa721dc3b19c"}, @@ -3496,7 +3496,7 @@ six = "*" name = "lark" version = "1.2.2" description = "a modern parsing library" -optional = false +optional = true python-versions = ">=3.8" files = [ {file = "lark-1.2.2-py3-none-any.whl", hash = "sha256:c2276486b02f0f1b90be155f2c8ba4a8e194d42775786db622faccd652d8e80c"}, @@ -3587,13 +3587,13 @@ files = [ [[package]] name = "litellm" -version = "1.55.0" +version = "1.55.3" description = "Library to easily interface with LLM API providers" optional = true python-versions = "!=2.7.*,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,!=3.7.*,>=3.8" files = [ - {file = "litellm-1.55.0-py3-none-any.whl", hash = "sha256:b257242039cc0753cdf7e7e288f9379d8ccad58015ce95bdc8a8ec337d2fa7eb"}, - {file = "litellm-1.55.0.tar.gz", hash = "sha256:d33dfabb7aa6f18294c43f20429d7d962b48104a0c2ddce08df7370029ac4780"}, + {file = "litellm-1.55.3-py3-none-any.whl", hash = "sha256:83e48a6104f2b30edb62f708ca47dfd42f22416ed2ab34702770b3a57d866aa5"}, + {file = "litellm-1.55.3.tar.gz", hash = "sha256:83f7fd5c7b6eec1d431e786be9d73fbb72f1f1bc9aff333169a4a8eb61e72018"}, ] [package.dependencies] @@ -3897,52 +3897,45 @@ tests = ["pytest", "simplejson"] [[package]] name = "matplotlib" -version = "3.9.4" +version = "3.10.0" description = "Python plotting package" optional = false -python-versions = ">=3.9" +python-versions = ">=3.10" files = [ - {file = "matplotlib-3.9.4-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:c5fdd7abfb706dfa8d307af64a87f1a862879ec3cd8d0ec8637458f0885b9c50"}, - {file = "matplotlib-3.9.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:d89bc4e85e40a71d1477780366c27fb7c6494d293e1617788986f74e2a03d7ff"}, - {file = "matplotlib-3.9.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ddf9f3c26aae695c5daafbf6b94e4c1a30d6cd617ba594bbbded3b33a1fcfa26"}, - {file = "matplotlib-3.9.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:18ebcf248030173b59a868fda1fe42397253f6698995b55e81e1f57431d85e50"}, - {file = "matplotlib-3.9.4-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:974896ec43c672ec23f3f8c648981e8bc880ee163146e0312a9b8def2fac66f5"}, - {file = "matplotlib-3.9.4-cp310-cp310-win_amd64.whl", hash = "sha256:4598c394ae9711cec135639374e70871fa36b56afae17bdf032a345be552a88d"}, - {file = "matplotlib-3.9.4-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:d4dd29641d9fb8bc4492420c5480398dd40a09afd73aebe4eb9d0071a05fbe0c"}, - {file = "matplotlib-3.9.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:30e5b22e8bcfb95442bf7d48b0d7f3bdf4a450cbf68986ea45fca3d11ae9d099"}, - {file = "matplotlib-3.9.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2bb0030d1d447fd56dcc23b4c64a26e44e898f0416276cac1ebc25522e0ac249"}, - {file = "matplotlib-3.9.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:aca90ed222ac3565d2752b83dbb27627480d27662671e4d39da72e97f657a423"}, - {file = "matplotlib-3.9.4-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:a181b2aa2906c608fcae72f977a4a2d76e385578939891b91c2550c39ecf361e"}, - {file = "matplotlib-3.9.4-cp311-cp311-win_amd64.whl", hash = "sha256:1f6882828231eca17f501c4dcd98a05abb3f03d157fbc0769c6911fe08b6cfd3"}, - {file = "matplotlib-3.9.4-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:dfc48d67e6661378a21c2983200a654b72b5c5cdbd5d2cf6e5e1ece860f0cc70"}, - {file = "matplotlib-3.9.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:47aef0fab8332d02d68e786eba8113ffd6f862182ea2999379dec9e237b7e483"}, - {file = "matplotlib-3.9.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fba1f52c6b7dc764097f52fd9ab627b90db452c9feb653a59945de16752e965f"}, - {file = "matplotlib-3.9.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:173ac3748acaac21afcc3fa1633924609ba1b87749006bc25051c52c422a5d00"}, - {file = "matplotlib-3.9.4-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:320edea0cadc07007765e33f878b13b3738ffa9745c5f707705692df70ffe0e0"}, - {file = "matplotlib-3.9.4-cp312-cp312-win_amd64.whl", hash = "sha256:a4a4cfc82330b27042a7169533da7991e8789d180dd5b3daeaee57d75cd5a03b"}, - {file = "matplotlib-3.9.4-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:37eeffeeca3c940985b80f5b9a7b95ea35671e0e7405001f249848d2b62351b6"}, - {file = "matplotlib-3.9.4-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:3e7465ac859ee4abcb0d836137cd8414e7bb7ad330d905abced457217d4f0f45"}, - {file = "matplotlib-3.9.4-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f4c12302c34afa0cf061bea23b331e747e5e554b0fa595c96e01c7b75bc3b858"}, - {file = "matplotlib-3.9.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2b8c97917f21b75e72108b97707ba3d48f171541a74aa2a56df7a40626bafc64"}, - {file = "matplotlib-3.9.4-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:0229803bd7e19271b03cb09f27db76c918c467aa4ce2ae168171bc67c3f508df"}, - {file = "matplotlib-3.9.4-cp313-cp313-win_amd64.whl", hash = "sha256:7c0d8ef442ebf56ff5e206f8083d08252ee738e04f3dc88ea882853a05488799"}, - {file = "matplotlib-3.9.4-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:a04c3b00066a688834356d196136349cb32f5e1003c55ac419e91585168b88fb"}, - {file = "matplotlib-3.9.4-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:04c519587f6c210626741a1e9a68eefc05966ede24205db8982841826af5871a"}, - {file = "matplotlib-3.9.4-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:308afbf1a228b8b525fcd5cec17f246bbbb63b175a3ef6eb7b4d33287ca0cf0c"}, - {file = "matplotlib-3.9.4-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ddb3b02246ddcffd3ce98e88fed5b238bc5faff10dbbaa42090ea13241d15764"}, - {file = "matplotlib-3.9.4-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:8a75287e9cb9eee48cb79ec1d806f75b29c0fde978cb7223a1f4c5848d696041"}, - {file = "matplotlib-3.9.4-cp313-cp313t-win_amd64.whl", hash = "sha256:488deb7af140f0ba86da003e66e10d55ff915e152c78b4b66d231638400b1965"}, - {file = "matplotlib-3.9.4-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:3c3724d89a387ddf78ff88d2a30ca78ac2b4c89cf37f2db4bd453c34799e933c"}, - {file = "matplotlib-3.9.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:d5f0a8430ffe23d7e32cfd86445864ccad141797f7d25b7c41759a5b5d17cfd7"}, - {file = "matplotlib-3.9.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6bb0141a21aef3b64b633dc4d16cbd5fc538b727e4958be82a0e1c92a234160e"}, - {file = "matplotlib-3.9.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:57aa235109e9eed52e2c2949db17da185383fa71083c00c6c143a60e07e0888c"}, - {file = "matplotlib-3.9.4-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:b18c600061477ccfdd1e6fd050c33d8be82431700f3452b297a56d9ed7037abb"}, - {file = "matplotlib-3.9.4-cp39-cp39-win_amd64.whl", hash = "sha256:ef5f2d1b67d2d2145ff75e10f8c008bfbf71d45137c4b648c87193e7dd053eac"}, - {file = "matplotlib-3.9.4-pp39-pypy39_pp73-macosx_10_15_x86_64.whl", hash = "sha256:44e0ed786d769d85bc787b0606a53f2d8d2d1d3c8a2608237365e9121c1a338c"}, - {file = "matplotlib-3.9.4-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:09debb9ce941eb23ecdbe7eab972b1c3e0276dcf01688073faff7b0f61d6c6ca"}, - {file = "matplotlib-3.9.4-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bcc53cf157a657bfd03afab14774d54ba73aa84d42cfe2480c91bd94873952db"}, - {file = "matplotlib-3.9.4-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:ad45da51be7ad02387801fd154ef74d942f49fe3fcd26a64c94842ba7ec0d865"}, - {file = "matplotlib-3.9.4.tar.gz", hash = "sha256:1e00e8be7393cbdc6fedfa8a6fba02cf3e83814b285db1c60b906a023ba41bc3"}, + {file = "matplotlib-3.10.0-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:2c5829a5a1dd5a71f0e31e6e8bb449bc0ee9dbfb05ad28fc0c6b55101b3a4be6"}, + {file = "matplotlib-3.10.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a2a43cbefe22d653ab34bb55d42384ed30f611bcbdea1f8d7f431011a2e1c62e"}, + {file = "matplotlib-3.10.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:607b16c8a73943df110f99ee2e940b8a1cbf9714b65307c040d422558397dac5"}, + {file = "matplotlib-3.10.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:01d2b19f13aeec2e759414d3bfe19ddfb16b13a1250add08d46d5ff6f9be83c6"}, + {file = "matplotlib-3.10.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:5e6c6461e1fc63df30bf6f80f0b93f5b6784299f721bc28530477acd51bfc3d1"}, + {file = "matplotlib-3.10.0-cp310-cp310-win_amd64.whl", hash = "sha256:994c07b9d9fe8d25951e3202a68c17900679274dadfc1248738dcfa1bd40d7f3"}, + {file = "matplotlib-3.10.0-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:fd44fc75522f58612ec4a33958a7e5552562b7705b42ef1b4f8c0818e304a363"}, + {file = "matplotlib-3.10.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:c58a9622d5dbeb668f407f35f4e6bfac34bb9ecdcc81680c04d0258169747997"}, + {file = "matplotlib-3.10.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:845d96568ec873be63f25fa80e9e7fae4be854a66a7e2f0c8ccc99e94a8bd4ef"}, + {file = "matplotlib-3.10.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5439f4c5a3e2e8eab18e2f8c3ef929772fd5641876db71f08127eed95ab64683"}, + {file = "matplotlib-3.10.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:4673ff67a36152c48ddeaf1135e74ce0d4bce1bbf836ae40ed39c29edf7e2765"}, + {file = "matplotlib-3.10.0-cp311-cp311-win_amd64.whl", hash = "sha256:7e8632baebb058555ac0cde75db885c61f1212e47723d63921879806b40bec6a"}, + {file = "matplotlib-3.10.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:4659665bc7c9b58f8c00317c3c2a299f7f258eeae5a5d56b4c64226fca2f7c59"}, + {file = "matplotlib-3.10.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:d44cb942af1693cced2604c33a9abcef6205601c445f6d0dc531d813af8a2f5a"}, + {file = "matplotlib-3.10.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a994f29e968ca002b50982b27168addfd65f0105610b6be7fa515ca4b5307c95"}, + {file = "matplotlib-3.10.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9b0558bae37f154fffda54d779a592bc97ca8b4701f1c710055b609a3bac44c8"}, + {file = "matplotlib-3.10.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:503feb23bd8c8acc75541548a1d709c059b7184cde26314896e10a9f14df5f12"}, + {file = "matplotlib-3.10.0-cp312-cp312-win_amd64.whl", hash = "sha256:c40ba2eb08b3f5de88152c2333c58cee7edcead0a2a0d60fcafa116b17117adc"}, + {file = "matplotlib-3.10.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:96f2886f5c1e466f21cc41b70c5a0cd47bfa0015eb2d5793c88ebce658600e25"}, + {file = "matplotlib-3.10.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:12eaf48463b472c3c0f8dbacdbf906e573013df81a0ab82f0616ea4b11281908"}, + {file = "matplotlib-3.10.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2fbbabc82fde51391c4da5006f965e36d86d95f6ee83fb594b279564a4c5d0d2"}, + {file = "matplotlib-3.10.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ad2e15300530c1a94c63cfa546e3b7864bd18ea2901317bae8bbf06a5ade6dcf"}, + {file = "matplotlib-3.10.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:3547d153d70233a8496859097ef0312212e2689cdf8d7ed764441c77604095ae"}, + {file = "matplotlib-3.10.0-cp313-cp313-win_amd64.whl", hash = "sha256:c55b20591ced744aa04e8c3e4b7543ea4d650b6c3c4b208c08a05b4010e8b442"}, + {file = "matplotlib-3.10.0-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:9ade1003376731a971e398cc4ef38bb83ee8caf0aee46ac6daa4b0506db1fd06"}, + {file = "matplotlib-3.10.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:95b710fea129c76d30be72c3b38f330269363fbc6e570a5dd43580487380b5ff"}, + {file = "matplotlib-3.10.0-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5cdbaf909887373c3e094b0318d7ff230b2ad9dcb64da7ade654182872ab2593"}, + {file = "matplotlib-3.10.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d907fddb39f923d011875452ff1eca29a9e7f21722b873e90db32e5d8ddff12e"}, + {file = "matplotlib-3.10.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:3b427392354d10975c1d0f4ee18aa5844640b512d5311ef32efd4dd7db106ede"}, + {file = "matplotlib-3.10.0-cp313-cp313t-win_amd64.whl", hash = "sha256:5fd41b0ec7ee45cd960a8e71aea7c946a28a0b8a4dcee47d2856b2af051f334c"}, + {file = "matplotlib-3.10.0-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:81713dd0d103b379de4516b861d964b1d789a144103277769238c732229d7f03"}, + {file = "matplotlib-3.10.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:359f87baedb1f836ce307f0e850d12bb5f1936f70d035561f90d41d305fdacea"}, + {file = "matplotlib-3.10.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ae80dc3a4add4665cf2faa90138384a7ffe2a4e37c58d83e115b54287c4f06ef"}, + {file = "matplotlib-3.10.0.tar.gz", hash = "sha256:b886d02a581b96704c9d1ffe55709e49b4d2d52709ccebc4be42db856e511278"}, ] [package.dependencies] @@ -3957,7 +3950,7 @@ pyparsing = ">=2.3.1" python-dateutil = ">=2.7" [package.extras] -dev = ["meson-python (>=0.13.1,<0.17.0)", "numpy (>=1.25)", "pybind11 (>=2.6,!=2.13.3)", "setuptools (>=64)", "setuptools_scm (>=7)"] +dev = ["meson-python (>=0.13.1,<0.17.0)", "pybind11 (>=2.13.2,!=2.13.3)", "setuptools (>=64)", "setuptools_scm (>=7)"] [[package]] name = "matplotlib-inline" @@ -4012,7 +4005,6 @@ python-versions = ">=3.7" files = [ {file = "milvus_lite-2.4.10-py3-none-macosx_10_9_x86_64.whl", hash = "sha256:fc4246d3ed7d1910847afce0c9ba18212e93a6e9b8406048436940578dfad5cb"}, {file = "milvus_lite-2.4.10-py3-none-macosx_11_0_arm64.whl", hash = "sha256:74a8e07c5e3b057df17fbb46913388e84df1dc403a200f4e423799a58184c800"}, - {file = "milvus_lite-2.4.10-py3-none-manylinux2014_aarch64.whl", hash = "sha256:240c7386b747bad696ecb5bd1f58d491e86b9d4b92dccee3315ed7256256eddc"}, {file = "milvus_lite-2.4.10-py3-none-manylinux2014_x86_64.whl", hash = "sha256:211d2e334a043f9282bdd9755f76b9b2d93b23bffa7af240919ffce6a8dfe325"}, ] @@ -4083,7 +4075,7 @@ files = [ name = "mpmath" version = "1.3.0" description = "Python library for arbitrary-precision floating-point arithmetic" -optional = false +optional = true python-versions = "*" files = [ {file = "mpmath-1.3.0-py3-none-any.whl", hash = "sha256:a0b2b9fe80bbcd81a6647ff13108738cfb482d481d826cc0e02f5b35e5c88d2c"}, @@ -4320,13 +4312,13 @@ testing-docutils = ["pygments", "pytest (>=8,<9)", "pytest-param-files (>=0.6.0, [[package]] name = "narwhals" -version = "1.18.2" +version = "1.18.4" description = "Extremely lightweight compatibility layer between dataframe libraries" optional = false python-versions = ">=3.8" files = [ - {file = "narwhals-1.18.2-py3-none-any.whl", hash = "sha256:8f28812178bf67e4cbe46009e71aebbcdef78a52acd3d06a747f17189dba9d4a"}, - {file = "narwhals-1.18.2.tar.gz", hash = "sha256:7f9c72e6811635c0344193d4ce06c9d9d9fb4af37db4b7d60a76b4c929654f35"}, + {file = "narwhals-1.18.4-py3-none-any.whl", hash = "sha256:c6bb6b6fba59caeab28a7d6ec1e79ab0040c75baef2e4152199ad1a9c266ef96"}, + {file = "narwhals-1.18.4.tar.gz", hash = "sha256:b1da4e2e4ab185824781760319ac1ec8ee2944a929795064c3a64ffff16b00c4"}, ] [package.extras] @@ -4478,7 +4470,7 @@ pyarrow = ["pyarrow (>=1.0.0)"] name = "nest-asyncio" version = "1.6.0" description = "Patch asyncio to allow nested event loops" -optional = false +optional = true python-versions = ">=3.5" files = [ {file = "nest_asyncio-1.6.0-py3-none-any.whl", hash = "sha256:87af6efd6b5e897c81050477ef65c62e2b2f35d51703cae01aff2905b1852e1c"}, @@ -4489,7 +4481,7 @@ files = [ name = "networkx" version = "3.4.2" description = "Python package for creating and manipulating graphs and networks" -optional = false +optional = true python-versions = ">=3.10" files = [ {file = "networkx-3.4.2-py3-none-any.whl", hash = "sha256:df5d4365b724cf81b8c6a7312509d0c22386097011ad1abe274afd5e9d3bbc5f"}, @@ -4629,7 +4621,7 @@ files = [ name = "nvidia-cublas-cu12" version = "12.4.5.8" description = "CUBLAS native runtime libraries" -optional = false +optional = true python-versions = ">=3" files = [ {file = "nvidia_cublas_cu12-12.4.5.8-py3-none-manylinux2014_aarch64.whl", hash = "sha256:0f8aa1706812e00b9f19dfe0cdb3999b092ccb8ca168c0db5b8ea712456fd9b3"}, @@ -4641,7 +4633,7 @@ files = [ name = "nvidia-cuda-cupti-cu12" version = "12.4.127" description = "CUDA profiling tools runtime libs." -optional = false +optional = true python-versions = ">=3" files = [ {file = "nvidia_cuda_cupti_cu12-12.4.127-py3-none-manylinux2014_aarch64.whl", hash = "sha256:79279b35cf6f91da114182a5ce1864997fd52294a87a16179ce275773799458a"}, @@ -4653,7 +4645,7 @@ files = [ name = "nvidia-cuda-nvrtc-cu12" version = "12.4.127" description = "NVRTC native runtime libraries" -optional = false +optional = true python-versions = ">=3" files = [ {file = "nvidia_cuda_nvrtc_cu12-12.4.127-py3-none-manylinux2014_aarch64.whl", hash = "sha256:0eedf14185e04b76aa05b1fea04133e59f465b6f960c0cbf4e37c3cb6b0ea198"}, @@ -4665,7 +4657,7 @@ files = [ name = "nvidia-cuda-runtime-cu12" version = "12.4.127" description = "CUDA Runtime native Libraries" -optional = false +optional = true python-versions = ">=3" files = [ {file = "nvidia_cuda_runtime_cu12-12.4.127-py3-none-manylinux2014_aarch64.whl", hash = "sha256:961fe0e2e716a2a1d967aab7caee97512f71767f852f67432d572e36cb3a11f3"}, @@ -4677,7 +4669,7 @@ files = [ name = "nvidia-cudnn-cu12" version = "9.1.0.70" description = "cuDNN runtime libraries" -optional = false +optional = true python-versions = ">=3" files = [ {file = "nvidia_cudnn_cu12-9.1.0.70-py3-none-manylinux2014_x86_64.whl", hash = "sha256:165764f44ef8c61fcdfdfdbe769d687e06374059fbb388b6c89ecb0e28793a6f"}, @@ -4691,7 +4683,7 @@ nvidia-cublas-cu12 = "*" name = "nvidia-cufft-cu12" version = "11.2.1.3" description = "CUFFT native runtime libraries" -optional = false +optional = true python-versions = ">=3" files = [ {file = "nvidia_cufft_cu12-11.2.1.3-py3-none-manylinux2014_aarch64.whl", hash = "sha256:5dad8008fc7f92f5ddfa2101430917ce2ffacd86824914c82e28990ad7f00399"}, @@ -4706,7 +4698,7 @@ nvidia-nvjitlink-cu12 = "*" name = "nvidia-curand-cu12" version = "10.3.5.147" description = "CURAND native runtime libraries" -optional = false +optional = true python-versions = ">=3" files = [ {file = "nvidia_curand_cu12-10.3.5.147-py3-none-manylinux2014_aarch64.whl", hash = "sha256:1f173f09e3e3c76ab084aba0de819c49e56614feae5c12f69883f4ae9bb5fad9"}, @@ -4718,7 +4710,7 @@ files = [ name = "nvidia-cusolver-cu12" version = "11.6.1.9" description = "CUDA solver native runtime libraries" -optional = false +optional = true python-versions = ">=3" files = [ {file = "nvidia_cusolver_cu12-11.6.1.9-py3-none-manylinux2014_aarch64.whl", hash = "sha256:d338f155f174f90724bbde3758b7ac375a70ce8e706d70b018dd3375545fc84e"}, @@ -4735,7 +4727,7 @@ nvidia-nvjitlink-cu12 = "*" name = "nvidia-cusparse-cu12" version = "12.3.1.170" description = "CUSPARSE native runtime libraries" -optional = false +optional = true python-versions = ">=3" files = [ {file = "nvidia_cusparse_cu12-12.3.1.170-py3-none-manylinux2014_aarch64.whl", hash = "sha256:9d32f62896231ebe0480efd8a7f702e143c98cfaa0e8a76df3386c1ba2b54df3"}, @@ -4750,7 +4742,7 @@ nvidia-nvjitlink-cu12 = "*" name = "nvidia-nccl-cu12" version = "2.21.5" description = "NVIDIA Collective Communication Library (NCCL) Runtime" -optional = false +optional = true python-versions = ">=3" files = [ {file = "nvidia_nccl_cu12-2.21.5-py3-none-manylinux2014_x86_64.whl", hash = "sha256:8579076d30a8c24988834445f8d633c697d42397e92ffc3f63fa26766d25e0a0"}, @@ -4760,7 +4752,7 @@ files = [ name = "nvidia-nvjitlink-cu12" version = "12.4.127" description = "Nvidia JIT LTO Library" -optional = false +optional = true python-versions = ">=3" files = [ {file = "nvidia_nvjitlink_cu12-12.4.127-py3-none-manylinux2014_aarch64.whl", hash = "sha256:4abe7fef64914ccfa909bc2ba39739670ecc9e820c83ccc7a6ed414122599b83"}, @@ -4772,7 +4764,7 @@ files = [ name = "nvidia-nvtx-cu12" version = "12.4.127" description = "NVIDIA Tools Extension" -optional = false +optional = true python-versions = ">=3" files = [ {file = "nvidia_nvtx_cu12-12.4.127-py3-none-manylinux2014_aarch64.whl", hash = "sha256:7959ad635db13edf4fc65c06a6e9f9e55fc2f92596db928d169c0bb031e88ef3"}, @@ -4907,13 +4899,13 @@ sympy = "*" [[package]] name = "openai" -version = "1.57.3" +version = "1.57.4" description = "The official Python library for the openai API" optional = false python-versions = ">=3.8" files = [ - {file = "openai-1.57.3-py3-none-any.whl", hash = "sha256:c4034a5676eb252ef2e0ed1f46d040ca3bdde24bb61b432f50bb0b38d0cf9ecf"}, - {file = "openai-1.57.3.tar.gz", hash = "sha256:2c98ca6532b30d8bc5029974d2fcbd793b650009c2b014f47ffd4f9fdfc1f9eb"}, + {file = "openai-1.57.4-py3-none-any.whl", hash = "sha256:7def1ab2d52f196357ce31b9cfcf4181529ce00838286426bb35be81c035dafb"}, + {file = "openai-1.57.4.tar.gz", hash = "sha256:a8f071a3e9198e2818f63aade68e759417b9f62c0971bdb83de82504b70b77f7"}, ] [package.dependencies] @@ -5196,7 +5188,7 @@ attrs = ">=19.2.0" name = "outlines" version = "0.1.11" description = "Probabilistic Generative Model Programming" -optional = false +optional = true python-versions = ">=3.9" files = [ {file = "outlines-0.1.11-py3-none-any.whl", hash = "sha256:f5a5f2242ed9802d3aab7a92789bf4008d734c576be9258cc0a297f690124727"}, @@ -5236,7 +5228,7 @@ vllm = ["numpy (<2)", "transformers", "vllm"] name = "outlines-core" version = "0.1.26" description = "Structured Text Generation in Rust" -optional = false +optional = true python-versions = ">=3.8" files = [ {file = "outlines_core-0.1.26-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:6a962a7452e7ac170fa04d405342cadae2d28fafa5b1830cef7aa610257ed32f"}, @@ -5906,20 +5898,20 @@ virtualenv = ">=20.10.0" [[package]] name = "primp" -version = "0.8.3" +version = "0.9.0" description = "HTTP client that can impersonate web browsers, mimicking their headers and `TLS/JA3/JA4/HTTP2` fingerprints" optional = true python-versions = ">=3.8" files = [ - {file = "primp-0.8.3-cp38-abi3-macosx_10_12_x86_64.whl", hash = "sha256:3d06e374cfc4ecac7015d3125684e6ddfe28d5a866f9b15c59c8f452419c308e"}, - {file = "primp-0.8.3-cp38-abi3-macosx_11_0_arm64.whl", hash = "sha256:6ac1ea7b9009f9355d5bfcbc48a20fa3efbf58e9fa0c495d7bd9ac8d03f71632"}, - {file = "primp-0.8.3-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ee54cf6a9bd2b3a826a03aef83bf4e3fdf63bcf2ae7c4ee2c6ee84d4b0581cd9"}, - {file = "primp-0.8.3-cp38-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:ab2a28832d4ad76d4ec5adf0e768414a1ebe859cc769eae34c5c4183c5cea470"}, - {file = "primp-0.8.3-cp38-abi3-manylinux_2_34_armv7l.whl", hash = "sha256:f698ad5aea4745d57365519c08305a5df31d7cf0b019377320747c57bdfbbc29"}, - {file = "primp-0.8.3-cp38-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:4e1a888b1f70402f0b70b516df02097e414e4df9111d1258b47b24023218cca5"}, - {file = "primp-0.8.3-cp38-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:73ee00f8c403204ff920cc384036539281c045650ec98db3f64bff2204618fa6"}, - {file = "primp-0.8.3-cp38-abi3-win_amd64.whl", hash = "sha256:cc30d790eab0bb922c1342d3dfd80bec7f79f3163467904cf3d8e0e1ff0af4b3"}, - {file = "primp-0.8.3.tar.gz", hash = "sha256:c6bb6d0186dbfb2e4a1bda1c4bc676966378a9999ee877b7cb20f718c5a9b4ad"}, + {file = "primp-0.9.0-cp38-abi3-macosx_10_12_x86_64.whl", hash = "sha256:5933a2ca7e8da3265a1a64f6faf5183d03175c2054fbfd30c70146e24162be05"}, + {file = "primp-0.9.0-cp38-abi3-macosx_11_0_arm64.whl", hash = "sha256:440ab0afedf5a516a114bc36a83570001e2c571cefb80547bbb2e1302f8a2302"}, + {file = "primp-0.9.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:55fd3978d5ba5bf55d01c9bd0716ba36413860d59d1be8ddd5871bbce01f65a6"}, + {file = "primp-0.9.0-cp38-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:6478587da195c09118018436446db5a9fb436be38f95faee1738e7046bbc72fb"}, + {file = "primp-0.9.0-cp38-abi3-manylinux_2_34_armv7l.whl", hash = "sha256:9c090616aa19101c0e7405ff332f10270d2515d4f92905e899e869060c08b445"}, + {file = "primp-0.9.0-cp38-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:84a089187f3b997829f5787ec554fb3ee6b4b26de762b7d136cfc0329252a35b"}, + {file = "primp-0.9.0-cp38-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:c7722b24cc639abd781527d7f87f6adfe70d2cfdd5de3838966fb99c218d56ce"}, + {file = "primp-0.9.0-cp38-abi3-win_amd64.whl", hash = "sha256:b8f4d04e8b3c4073a61efd8ed65a1ed5aa8ca689569c4de0ebe795285fd002d2"}, + {file = "primp-0.9.0.tar.gz", hash = "sha256:fb348bd5496bddeb6502103238a0028551ed46d67b7bc9374ff7ad7443ca712a"}, ] [package.extras] @@ -6182,7 +6174,6 @@ description = "Pure-Python implementation of ASN.1 types and DER/BER/CER codecs optional = true python-versions = ">=3.8" files = [ - {file = "pyasn1-0.6.1-py3-none-any.whl", hash = "sha256:0d632f46f2ba09143da3a8afe9e33fb6f92fa2320ab7e886e2d0f7672af84629"}, {file = "pyasn1-0.6.1.tar.gz", hash = "sha256:6f580d2bdd84365380830acf45550f2511469f673cb4a5ae3857a3170128b034"}, ] @@ -6193,7 +6184,6 @@ description = "A collection of ASN.1-based protocols modules" optional = true python-versions = ">=3.8" files = [ - {file = "pyasn1_modules-0.4.1-py3-none-any.whl", hash = "sha256:49bfa96b45a292b711e986f222502c1c9a5e1f4e568fc30e2574a6c7d07838fd"}, {file = "pyasn1_modules-0.4.1.tar.gz", hash = "sha256:c28e2dbf9c06ad61c71a075c7e0f9fd0f1b0bb2d2ad4377f240d33ac2ab60a7c"}, ] @@ -6246,7 +6236,7 @@ numpy = "*" name = "pycountry" version = "24.6.1" description = "ISO country, subdivision, language, currency and script definitions and their translations" -optional = false +optional = true python-versions = ">=3.8" files = [ {file = "pycountry-24.6.1-py3-none-any.whl", hash = "sha256:f1a4fb391cd7214f8eefd39556d740adcc233c778a27f8942c8dca351d6ce06f"}, @@ -6387,13 +6377,13 @@ typing-extensions = ">=4.6.0,<4.7.0 || >4.7.0" [[package]] name = "pydata-sphinx-theme" -version = "0.16.0" +version = "0.16.1" description = "Bootstrap-based Sphinx theme from the PyData community" optional = false python-versions = ">=3.9" files = [ - {file = "pydata_sphinx_theme-0.16.0-py3-none-any.whl", hash = "sha256:18c810ee4e67e05281e371e156c1fb5bb0fa1f2747240461b225272f7d8d57d8"}, - {file = "pydata_sphinx_theme-0.16.0.tar.gz", hash = "sha256:721dd26e05fa8b992d66ef545536e6cbe0110afb9865820a08894af1ad6f7707"}, + {file = "pydata_sphinx_theme-0.16.1-py3-none-any.whl", hash = "sha256:225331e8ac4b32682c18fcac5a57a6f717c4e632cea5dd0e247b55155faeccde"}, + {file = "pydata_sphinx_theme-0.16.1.tar.gz", hash = "sha256:a08b7f0b7f70387219dc659bff0893a7554d5eb39b59d3b8ef37b8401b7642d7"}, ] [package.dependencies] @@ -6510,7 +6500,6 @@ python-versions = ">=3.9" files = [ {file = "pymupdf-1.25.1-cp39-abi3-macosx_10_9_x86_64.whl", hash = "sha256:793f9f6d51029e97851c711b3f6d9fe912313d95a306fbe8b1866f301d0e2bd3"}, {file = "pymupdf-1.25.1-cp39-abi3-macosx_11_0_arm64.whl", hash = "sha256:15e6f4013ad0a029a2221920f9d2081f56dc43259dabfdf5cad7fbf1cee4b5a7"}, - {file = "pymupdf-1.25.1-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:a39afbd80381f43e30d6eb2ec4613f465f507ac2b76070abdd2da8724f32ef36"}, {file = "pymupdf-1.25.1-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:b63f8e9e65b0bda48f9217efd4d2a8c6d7a739dd28baf460c1ae78439b9af489"}, {file = "pymupdf-1.25.1-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:a687bd387589e30abd810a78a23341f57f43fa16a4d8d8c0b870bb6d89607343"}, {file = "pymupdf-1.25.1-cp39-abi3-win32.whl", hash = "sha256:fc7dbc1aa9e298a4c81084e389c9623c26fcaa232c71efaa073af150069e2221"}, @@ -6844,13 +6833,13 @@ files = [ [[package]] name = "python-multipart" -version = "0.0.19" +version = "0.0.20" description = "A streaming multipart parser for Python" optional = false python-versions = ">=3.8" files = [ - {file = "python_multipart-0.0.19-py3-none-any.whl", hash = "sha256:f8d5b0b9c618575bf9df01c684ded1d94a338839bdd8223838afacfb4bb2082d"}, - {file = "python_multipart-0.0.19.tar.gz", hash = "sha256:905502ef39050557b7a6af411f454bc19526529ca46ae6831508438890ce12cc"}, + {file = "python_multipart-0.0.20-py3-none-any.whl", hash = "sha256:8a62d3a8335e06589fe01f2a3e178cdcc632f3fbe0d492ad9ee0ec35aab1f104"}, + {file = "python_multipart-0.0.20.tar.gz", hash = "sha256:8dd0cab45b8e23064ae09147625994d090fa46f5b0d1e13af944c331a7fa9d13"}, ] [[package]] @@ -8100,7 +8089,7 @@ files = [ name = "setuptools" version = "75.6.0" description = "Easily download, build, install, upgrade, and uninstall Python packages" -optional = false +optional = true python-versions = ">=3.9" files = [ {file = "setuptools-75.6.0-py3-none-any.whl", hash = "sha256:ce74b49e8f7110f9bf04883b730f4765b774ef3ef28f722cce7c273d253aaf7d"}, @@ -8515,7 +8504,7 @@ typing-extensions = {version = ">=4.5.0", markers = "python_version >= \"3.7\""} name = "sympy" version = "1.13.1" description = "Computer algebra system (CAS) in Python" -optional = false +optional = true python-versions = ">=3.8" files = [ {file = "sympy-1.13.1-py3-none-any.whl", hash = "sha256:db36cdc64bf61b9b24578b6f7bab1ecdd2452cf008f34faa33776680c26d66f8"}, @@ -8532,7 +8521,7 @@ dev = ["hypothesis (>=6.70.0)", "pytest (>=7.1.0)"] name = "sympy" version = "1.13.3" description = "Computer algebra system (CAS) in Python" -optional = false +optional = true python-versions = ">=3.8" files = [ {file = "sympy-1.13.3-py3-none-any.whl", hash = "sha256:54612cf55a62755ee71824ce692986f23c88ffa77207b30c1368eda4a7060f73"}, @@ -8826,7 +8815,7 @@ files = [ name = "torch" version = "2.2.1" description = "Tensors and Dynamic neural networks in Python with strong GPU acceleration" -optional = false +optional = true python-versions = ">=3.8.0" files = [ {file = "torch-2.2.1-cp310-cp310-manylinux1_x86_64.whl", hash = "sha256:8d3bad336dd2c93c6bcb3268e8e9876185bda50ebde325ef211fb565c7d15273"}, @@ -8872,7 +8861,7 @@ optree = ["optree (>=0.9.1)"] name = "torch" version = "2.5.1" description = "Tensors and Dynamic neural networks in Python with strong GPU acceleration" -optional = false +optional = true python-versions = ">=3.8.0" files = [ {file = "torch-2.5.1-cp310-cp310-manylinux1_x86_64.whl", hash = "sha256:71328e1bbe39d213b8721678f9dcac30dfc452a46d586f1d514a6aa0a99d4744"}, @@ -9054,13 +9043,13 @@ test = ["argcomplete (>=3.0.3)", "mypy (>=1.7.0)", "pre-commit", "pytest (>=7.0, [[package]] name = "transformers" -version = "4.47.0" +version = "4.47.1" description = "State-of-the-art Machine Learning for JAX, PyTorch and TensorFlow" optional = true python-versions = ">=3.9.0" files = [ - {file = "transformers-4.47.0-py3-none-any.whl", hash = "sha256:a8e1bafdaae69abdda3cad638fe392e37c86d2ce0ecfcae11d60abb8f949ff4d"}, - {file = "transformers-4.47.0.tar.gz", hash = "sha256:f8ead7a5a4f6937bb507e66508e5e002dc5930f7b6122a9259c37b099d0f3b19"}, + {file = "transformers-4.47.1-py3-none-any.whl", hash = "sha256:d2f5d19bb6283cd66c893ec7e6d931d6370bbf1cc93633326ff1f41a40046c9c"}, + {file = "transformers-4.47.1.tar.gz", hash = "sha256:6c29c05a5f595e278481166539202bf8641281536df1c42357ee58a45d0a564a"}, ] [package.dependencies] @@ -9161,7 +9150,7 @@ wsproto = ">=0.14" name = "triton" version = "3.1.0" description = "A language and compiler for custom Deep Learning operations" -optional = false +optional = true python-versions = "*" files = [ {file = "triton-3.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6b0dd10a925263abbe9fa37dcde67a5e9b2383fc269fdf59f5657cac38c5d1d8"}, @@ -9667,13 +9656,13 @@ zstd = ["zstandard (>=0.18.0)"] [[package]] name = "uvicorn" -version = "0.32.1" +version = "0.34.0" description = "The lightning-fast ASGI server." optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "uvicorn-0.32.1-py3-none-any.whl", hash = "sha256:82ad92fd58da0d12af7482ecdb5f2470a04c9c9a53ced65b9bbb4a205377602e"}, - {file = "uvicorn-0.32.1.tar.gz", hash = "sha256:ee9519c246a72b1c084cea8d3b44ed6026e78a4a309cbedae9c37e4cb9fbb175"}, + {file = "uvicorn-0.34.0-py3-none-any.whl", hash = "sha256:023dc038422502fa28a09c7a30bf2b6991512da7dcdb8fd35fe57cfc154126f4"}, + {file = "uvicorn-0.34.0.tar.gz", hash = "sha256:404051050cd7e905de2c9a7e61790943440b3416f49cb409f965d9dcd0fa73e9"}, ] [package.dependencies] @@ -10252,7 +10241,7 @@ test = ["big-O", "importlib-resources", "jaraco.functools", "jaraco.itertools", type = ["pytest-mypy"] [extras] -all = ["PyMuPDF", "accelerate", "agentops", "anthropic", "apify_client", "arxiv", "arxiv2text", "asknews", "azure-storage-blob", "beautifulsoup4", "botocore", "cohere", "cohere", "datacommons", "datacommons_pandas", "datasets", "diffusers", "discord.py", "docker", "docx2txt", "duckduckgo-search", "e2b-code-interpreter", "ffmpeg-python", "firecrawl-py", "google-cloud-storage", "google-generativeai", "googlemaps", "imageio", "ipykernel", "jupyter_client", "litellm", "mistralai", "nebula3-python", "neo4j", "newspaper3k", "nltk", "notion-client", "openapi-spec-validator", "opencv-python", "pdfplumber", "pillow", "prance", "praw", "pyTelegramBotAPI", "pydub", "pygithub", "pymilvus", "pyowm", "pyyaml", "qdrant-client", "rank-bm25", "redis", "reka-api", "requests_oauthlib", "scholarly", "sentence-transformers", "sentencepiece", "sglang", "slack-bolt", "slack-sdk", "soundfile", "stripe", "tavily-python", "textblob", "torch", "torch", "transformers", "unstructured", "wikipedia", "wolframalpha", "yt-dlp"] +all = ["PyMuPDF", "accelerate", "agentops", "anthropic", "apify_client", "arxiv", "arxiv2text", "asknews", "azure-storage-blob", "beautifulsoup4", "botocore", "cohere", "cohere", "datacommons", "datacommons_pandas", "datasets", "diffusers", "discord.py", "docker", "docx2txt", "duckduckgo-search", "e2b-code-interpreter", "ffmpeg-python", "firecrawl-py", "google-cloud-storage", "google-generativeai", "googlemaps", "imageio", "ipykernel", "jupyter_client", "litellm", "mistralai", "nebula3-python", "neo4j", "newspaper3k", "nltk", "notion-client", "openapi-spec-validator", "opencv-python", "outlines", "pdfplumber", "pillow", "prance", "praw", "pyTelegramBotAPI", "pydub", "pygithub", "pymilvus", "pyowm", "pyyaml", "qdrant-client", "rank-bm25", "redis", "reka-api", "requests_oauthlib", "scholarly", "sentence-transformers", "sentencepiece", "sglang", "slack-bolt", "slack-sdk", "soundfile", "stripe", "tavily-python", "textblob", "torch", "torch", "transformers", "unstructured", "wikipedia", "wolframalpha", "yt-dlp"] encoders = ["sentence-transformers"] graph-storages = ["nebula3-python", "neo4j"] huggingface-agent = ["accelerate", "datasets", "diffusers", "opencv-python", "sentencepiece", "soundfile", "torch", "torch", "transformers"] @@ -10264,10 +10253,10 @@ retrievers = ["cohere", "rank-bm25"] runtime = ["docker"] search-tools = ["duckduckgo-search", "tavily-python", "wikipedia", "wolframalpha"] test = ["mock", "pytest", "pytest-asyncio"] -tools = ["PyMuPDF", "agentops", "apify_client", "arxiv", "arxiv2text", "asknews", "beautifulsoup4", "datacommons", "datacommons_pandas", "discord.py", "docker", "docx2txt", "duckduckgo-search", "e2b-code-interpreter", "ffmpeg-python", "firecrawl-py", "googlemaps", "imageio", "ipykernel", "jupyter_client", "newspaper3k", "nltk", "notion-client", "openapi-spec-validator", "pdfplumber", "pillow", "prance", "praw", "pyTelegramBotAPI", "pydub", "pygithub", "pyowm", "pyyaml", "requests_oauthlib", "scholarly", "slack-bolt", "slack-sdk", "stripe", "textblob", "unstructured", "wikipedia", "wolframalpha", "yt-dlp"] +tools = ["PyMuPDF", "agentops", "apify_client", "arxiv", "arxiv2text", "asknews", "beautifulsoup4", "datacommons", "datacommons_pandas", "discord.py", "docker", "docx2txt", "duckduckgo-search", "e2b-code-interpreter", "ffmpeg-python", "firecrawl-py", "googlemaps", "imageio", "ipykernel", "jupyter_client", "newspaper3k", "nltk", "notion-client", "openapi-spec-validator", "outlines", "pdfplumber", "pillow", "prance", "praw", "pyTelegramBotAPI", "pydub", "pygithub", "pyowm", "pyyaml", "requests_oauthlib", "scholarly", "slack-bolt", "slack-sdk", "stripe", "textblob", "unstructured", "wikipedia", "wolframalpha", "yt-dlp"] vector-databases = ["pymilvus", "qdrant-client"] [metadata] lock-version = "2.0" python-versions = ">=3.10,<3.13" -content-hash = "ac277f57c28fd1a0fbf8cfdbafd06ab0cfafd12b802af03368fd1810f4765408" +content-hash = "82410a7435ecb8fc90bbb60a18d0de143149b7cd1e039d67890b1fc71a5754c1" diff --git a/pyproject.toml b/pyproject.toml index a6b15bca15..ed6ef2fc11 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -198,6 +198,7 @@ tools = [ "prance", "openapi-spec-validator", "unstructured", + "outlines", "e2b-code-interpreter", "firecrawl-py", "arxiv", @@ -288,6 +289,7 @@ all = [ "prance", "openapi-spec-validator", "unstructured", + "outlines", "e2b-code-interpreter", "nltk", "firecrawl-py",