š« CAMEL: The first and the best multi-agent framework. Finding the Scaling Law of Agents. https://www.camel-ai.org
Python agentai-societiesartificial-intelligencecommunicative-aicooperative-aideep-learninglarge-language-modelsmulti-agent-systemsnatural-language-processing
feat: add video description into agent func (#585)
Ray849896c67ef5
diff --git a/camel/messages/base.py b/camel/messages/base.pyindex d6a142adb..126c27171 100644--- a/camel/messages/base.py+++ b/camel/messages/base.py@@ -16,6 +16,7 @@ import iofrom dataclasses import dataclassfrom typing import Any, Dict, List, Literal, Optional, Tuple, Union+import numpy as npfrom PIL import Imagefrom camel.messages import (@@ -27,10 +28,11 @@ from camel.messages import (from camel.prompts import CodePrompt, TextPromptfrom camel.types import (OpenAIBackendRole,- OpenAIImageDetailType,OpenAIImageType,+ OpenAIVisionDetailType,RoleType,)+from camel.utils import Constants@dataclass@@ -39,19 +41,29 @@ class BaseMessage:Args:role_name (str): The name of the user or assistant role.- role_type (RoleType): The type of role, either- :obj:`RoleType.ASSISTANT` or :obj:`RoleType.USER`.+ role_type (RoleType): The type of role, either :obj:`RoleType.+ ASSISTANT` or :obj:`RoleType.USER`.meta_dict (Optional[Dict[str, str]]): Additional metadata dictionaryfor the message.content (str): The content of the message.+ video_bytes (Optional[bytes]): Optional bytes of a video associated+ with the message. Default is None.+ image_list (Optional[List[Image.Image]]): Optional list of PIL Image+ objects associated with the message. Default is None.+ image_detail (Literal["auto", "low", "high"]): Detail level of the+ images associated with the message. Default is "auto".+ video_detail (Literal["auto", "low", "high"]): Detail level of the+ videos associated with the message. Default is "low"."""role_name: strrole_type: RoleTypemeta_dict: Optional[Dict[str, str]]content: str- image: Optional[Image.Image] = None+ video_bytes: Optional[bytes] = None+ image_list: Optional[List[Image.Image]] = Noneimage_detail: Literal["auto", "low", "high"] = "auto"+ video_detail: Literal["auto", "low", "high"] = "low"@classmethoddef make_user_message(@@ -59,16 +71,24 @@ class BaseMessage:role_name: str,content: str,meta_dict: Optional[Dict[str, str]] = None,- image: Optional[Image.Image] = None,- image_detail: Union[OpenAIImageDetailType, str] = "auto",- ) -> 'BaseMessage':+ video_bytes: Optional[bytes] = None,+ image_list: Optional[List[Image.Image]] = None,+ image_detail: Union[+ OpenAIVisionDetailType, str+ ] = OpenAIVisionDetailType.AUTO,+ video_detail: Union[+ OpenAIVisionDetailType, str+ ] = OpenAIVisionDetailType.LOW,+ ) -> "BaseMessage":return cls(role_name,RoleType.USER,meta_dict,content,- image,- OpenAIImageDetailType(image_detail).value,+ video_bytes,+ image_list,+ OpenAIVisionDetailType(image_detail).value,+ OpenAIVisionDetailType(video_detail).value,)@classmethod@@ -77,16 +97,24 @@ class BaseMessage:role_name: str,content: str,meta_dict: Optional[Dict[str, str]] = None,- image: Optional[Image.Image] = None,- image_detail: Union[OpenAIImageDetailType, str] = "auto",- ) -> 'BaseMessage':+ video_bytes: Optional[bytes] = None,+ image_list: Optional[List[Image.Image]] = None,+ image_detail: Union[+ OpenAIVisionDetailType, str+ ] = OpenAIVisionDetailType.AUTO,+ video_detail: Union[+ OpenAIVisionDetailType, str+ ] = OpenAIVisionDetailType.LOW,+ ) -> "BaseMessage":return cls(role_name,RoleType.ASSISTANT,meta_dict,content,- image,- OpenAIImageDetailType(image_detail).value,+ video_bytes,+ image_list,+ OpenAIVisionDetailType(image_detail).value,+ OpenAIVisionDetailType(video_detail).value,)def create_new_instance(self, content: str) -> "BaseMessage":@@ -241,46 +269,107 @@ class BaseMessage:Returns:OpenAIUserMessage: The converted :obj:`OpenAIUserMessage` object."""- if self.image is None:- return {"role": "user", "content": self.content}- else:- #- if self.image.format is None:- raise ValueError(- f"Image's `format` is `None`, please "- f"transform the `PIL.Image.Image` to one of "- f"following supported formats, such as "- f"{list(OpenAIImageType)}"- )-- image_type: str = self.image.format.lower()- if image_type not in OpenAIImageType:- raise ValueError(- f"Image type {self.image.format} "- f"is not supported by OpenAI vision model"- )- with io.BytesIO() as buffer:- self.image.save(fp=buffer, format=self.image.format)- encoded_image = base64.b64encode(buffer.getvalue()).decode(- "utf-8"- )- image_prefix = f"data:image/{image_type};base64,"+ hybird_content: List[Any] = []+ hybird_content.append(+ {+ "type": "text",+ "text": self.content,+ }+ )- return {- "role": "user",- "content": [- {- "type": "text",- "text": self.content,- },+ if self.image_list and len(self.image_list) > 0:+ for image in self.image_list:+ if image.format is None:+ raise ValueError(+ f"Image's `format` is `None`, please "+ f"transform the `PIL.Image.Image` to one of "+ f"following supported formats, such as "+ f"{list(OpenAIImageType)}"+ )++ image_type: str = image.format.lower()+ if image_type not in OpenAIImageType:+ raise ValueError(+ f"Image type {image.format} "+ f"is not supported by OpenAI vision model"+ )+ with io.BytesIO() as buffer:+ image.save(fp=buffer, format=image.format)+ encoded_image = base64.b64encode(buffer.getvalue()).decode(+ "utf-8"+ )+ image_prefix = f"data:image/{image_type};base64,"+ hybird_content.append({"type": "image_url","image_url": {"url": f"{image_prefix}{encoded_image}","detail": self.image_detail,},+ }+ )++ if self.video_bytes:+ import imageio.v3 as iio++ base64Frames: List[str] = []+ frame_count = 0+ # read video bytes+ video = iio.imiter(+ self.video_bytes, plugin=Constants.VIDEO_DEFAULT_PLUG_PYAV+ )++ for frame in video:+ frame_count += 1+ if (+ frame_count % Constants.VIDEO_IMAGE_EXTRACTION_INTERVAL+ == 0+ ):+ # convert frame to numpy array+ frame_array = np.asarray(frame)+ frame_image = Image.fromarray(frame_array)++ # Get the dimensions of the frame+ width, height = frame_image.size++ # resize the frame to the default image size+ new_width = Constants.VIDEO_DEFAULT_IMAGE_SIZE+ aspect_ratio = width / height+ new_height = int(new_width / aspect_ratio)+ resized_img = frame_image.resize((new_width, new_height))++ # encode the image to base64+ with io.BytesIO() as buffer:+ image_format = OpenAIImageType.JPEG.value+ image_format = image_format.upper()+ resized_img.save(fp=buffer, format=image_format)+ encoded_image = base64.b64encode(+ buffer.getvalue()+ ).decode("utf-8")++ base64Frames.append(encoded_image)++ for encoded_image in base64Frames:+ item = {+ "type": "image_url",+ "image_url": {+ "url": f"data:image/jpeg;base64,{encoded_image}",+ "detail": self.video_detail,},- ],+ }++ hybird_content.append(item)++ if len(hybird_content) > 1:+ return {+ "role": "user",+ "content": hybird_content,+ }+ # This return just for str message+ else:+ return {+ "role": "user",+ "content": self.content,}def to_openai_assistant_message(self) -> OpenAIAssistantMessage:diff --git a/camel/prompts/__init__.py b/camel/prompts/__init__.pyindex 603d5240f..9ddd07f69 100644--- a/camel/prompts/__init__.py+++ b/camel/prompts/__init__.py@@ -14,6 +14,7 @@from .ai_society import AISocietyPromptTemplateDictfrom .base import CodePrompt, TextPrompt, TextPromptDictfrom .code import CodePromptTemplateDict+from .descripte_video_prompt import DescriptionVideoPromptTemplateDictfrom .evaluation import EvaluationPromptTemplateDictfrom .misalignment import MisalignmentPromptTemplateDictfrom .object_recognition import ObjectRecognitionPromptTemplateDict@@ -37,4 +38,5 @@ __all__ = ['PromptTemplateGenerator','SolutionExtractionPromptTemplateDict','ObjectRecognitionPromptTemplateDict',+ 'DescriptionVideoPromptTemplateDict',]diff --git a/camel/prompts/descripte_video_prompt.py b/camel/prompts/descripte_video_prompt.pynew file mode 100644index 000000000..42836e349--- /dev/null+++ b/camel/prompts/descripte_video_prompt.py@@ -0,0 +1,33 @@+# =========== Copyright 2023 @ 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 @ CAMEL-AI.org. All Rights Reserved. ===========+from typing import Any++from camel.prompts.base import TextPrompt, TextPromptDict+from camel.types import RoleType+++# flake8: noqa :E501+class DescriptionVideoPromptTemplateDict(TextPromptDict):+ ASSISTANT_PROMPT = TextPrompt(+ """You are a master of video analysis.+ Please provide a shot description of the content of the current video."""+ )++ def __init__(self, *args: Any, **kwargs: Any) -> None:+ super().__init__(*args, **kwargs)+ self.update(+ {+ RoleType.ASSISTANT: self.ASSISTANT_PROMPT,+ }+ )diff --git a/camel/prompts/task_prompt_template.py b/camel/prompts/task_prompt_template.pyindex 45eea6b6e..b7fbd80b6 100644--- a/camel/prompts/task_prompt_template.py+++ b/camel/prompts/task_prompt_template.py@@ -18,6 +18,9 @@ from camel.prompts.ai_society import (TextPromptDict,)from camel.prompts.code import CodePromptTemplateDict+from camel.prompts.descripte_video_prompt import (+ DescriptionVideoPromptTemplateDict,+)from camel.prompts.evaluation import (EvaluationPromptTemplateDict,)@@ -57,5 +60,6 @@ class TaskPromptTemplateDict(Dict[Any, TextPromptDict]):TaskType.SOLUTION_EXTRACTION: SolutionExtractionPromptTemplateDict(), # noqa: E501TaskType.ROLE_DESCRIPTION: RoleDescriptionPromptTemplateDict(),TaskType.OBJECT_RECOGNITION: ObjectRecognitionPromptTemplateDict(), # noqa: E501+ TaskType.DESCRIPTE_VIDEO: DescriptionVideoPromptTemplateDict(),})diff --git a/camel/types/__init__.py b/camel/types/__init__.pyindex 065209df2..39542fdb6 100644--- a/camel/types/__init__.py+++ b/camel/types/__init__.py@@ -16,8 +16,8 @@ from .enums import (EmbeddingModelType,ModelType,OpenAIBackendRole,- OpenAIImageDetailType,OpenAIImageType,+ OpenAIVisionDetailType,OpenAPIName,RoleType,StorageType,@@ -58,8 +58,9 @@ __all__ = ['ChatCompletionAssistantMessageParam','ChatCompletionFunctionMessageParam','CompletionUsage',+ 'OpenAIVideoType','OpenAIImageType',- 'OpenAIImageDetailType',+ 'OpenAIVisionDetailType','OpenAPIName','AudioModelType','VoiceType',diff --git a/camel/types/enums.py b/camel/types/enums.pyindex 82a903f49..b0ab33617 100644--- a/camel/types/enums.py+++ b/camel/types/enums.py@@ -191,6 +191,7 @@ class TaskType(Enum):ROLE_DESCRIPTION = "role_description"OBJECT_RECOGNITION = "object_recognition"DEFAULT = "default"+ DESCRIPTE_VIDEO = "descripte_video"class VectorDistance(Enum):@@ -238,7 +239,7 @@ class OpenAIImageType(Enum, metaclass=OpenAIImageTypeMeta):GIF = "gif"-class OpenAIImageDetailType(Enum):+class OpenAIVisionDetailType(Enum):AUTO = "auto"LOW = "low"HIGH = "high"diff --git a/camel/utils/__init__.py b/camel/utils/__init__.pyindex c0e9b7db3..69b71cb47 100644--- a/camel/utils/__init__.py+++ b/camel/utils/__init__.py@@ -28,6 +28,7 @@ from .commons import (text_extract_from_web,to_pascal,)+from .constants import Constantsfrom .token_counting import (AnthropicTokenCounter,BaseTokenCounter,@@ -52,6 +53,7 @@ __all__ = ['BaseTokenCounter','OpenAITokenCounter','OpenSourceTokenCounter',+ 'Constants','text_extract_from_web','create_chunks','dependencies_required',diff --git a/camel/utils/constants.py b/camel/utils/constants.pynew file mode 100644index 000000000..a5d969acb--- /dev/null+++ b/camel/utils/constants.py@@ -0,0 +1,26 @@+# =========== Copyright 2023 @ 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 @ CAMEL-AI.org. All Rights Reserved. ===========+++class Constants:+ # This value defines the default size (both width and height) for images+ # extracted from a video.+ VIDEO_DEFAULT_IMAGE_SIZE = 768++ # This value defines the interval (in number of frames) at which images+ # are extracted from the video.+ VIDEO_IMAGE_EXTRACTION_INTERVAL = 50++ # default plug of imageio to read video+ VIDEO_DEFAULT_PLUG_PYAV = "pyav"diff --git a/camel/utils/token_counting.py b/camel/utils/token_counting.pyindex 496f09306..21e43ddda 100644--- a/camel/utils/token_counting.py+++ b/camel/utils/token_counting.py@@ -23,7 +23,7 @@ from typing import TYPE_CHECKING, List, Optionalfrom anthropic import Anthropicfrom PIL import Image-from camel.types import ModelType, OpenAIImageDetailType, OpenAIImageType+from camel.types import ModelType, OpenAIImageType, OpenAIVisionDetailTypeif TYPE_CHECKING:from camel.messages import OpenAIMessage@@ -245,6 +245,7 @@ class OpenAITokenCounter(BaseTokenCounter):elif item["type"] == "image_url":image_str: str = item["image_url"]["url"]detail = item["image_url"]["detail"]+image_prefix_format = "data:image/{};base64,"image_prefix: Optional[str] = Nonefor image_type in list(OpenAIImageType):@@ -261,7 +262,7 @@ class OpenAITokenCounter(BaseTokenCounter):)image = Image.open(image_bytes)num_tokens += count_tokens_from_image(- image, OpenAIImageDetailType(detail)+ image, OpenAIVisionDetailType(detail))if key == "name":num_tokens += self.tokens_per_name@@ -301,7 +302,7 @@ class AnthropicTokenCounter(BaseTokenCounter):def count_tokens_from_image(- image: Image.Image, detail: OpenAIImageDetailType+ image: Image.Image, detail: OpenAIVisionDetailType) -> int:r"""Count image tokens for OpenAI vision model. An :obj:`"auto"`resolution model will be treated as :obj:`"high"`. All images with@@ -315,13 +316,13 @@ def count_tokens_from_image(Args:image (PIL.Image.Image): Image to count number of tokens.- detail (OpenAIImageDetailType): Image detail type to count+ detail (OpenAIVisionDetailType): Image detail type to countnumber of tokens.Returns:int: Number of tokens for the image given a detail type."""- if detail == OpenAIImageDetailType.LOW:+ if detail == OpenAIVisionDetailType.LOW:return LOW_DETAIL_TOKENSwidth, height = image.sizediff --git a/examples/vision/descripte_video.py b/examples/vision/descripte_video.pynew file mode 100644index 000000000..322d8a757--- /dev/null+++ b/examples/vision/descripte_video.py@@ -0,0 +1,74 @@+# =========== Copyright 2023 @ 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 @ CAMEL-AI.org. All Rights Reserved. ===========++from camel.agents import ChatAgent+from camel.configs.openai_config import ChatGPTConfig+from camel.messages import BaseMessage+from camel.prompts.prompt_templates import PromptTemplateGenerator+from camel.types import ModelType+from camel.types.enums import RoleType, TaskType++# Define system message+sys_msg_prompt = PromptTemplateGenerator().get_prompt_from_key(+ TaskType.DESCRIPTE_VIDEO, RoleType.ASSISTANT+)+sys_msg = BaseMessage.make_assistant_message(+ role_name="Assistant",+ content=sys_msg_prompt,+)++# Set model config+model_config = ChatGPTConfig(+ temperature=0.0,+)++# Set agent+camel_agent = ChatAgent(+ sys_msg,+ model_config=model_config,+ model_type=ModelType.GPT_4O,+)++# The video from YouTube can be found at the following link:+# https://www.youtube.com/watch?v=kQ_7GtE529M+video_path = "bison.mp4"+with open(video_path, "rb") as video_file:+ video_bytes = video_file.read()+user_msg = BaseMessage.make_user_message(+ role_name="User",+ content="These are frames from a video that I want to upload. Generate a"+ "compelling description that I can upload along with the video.",+ video_bytes=video_bytes,+)++# Get response information+response = camel_agent.step(user_msg)+print(response.msgs[0].content)+"""+===============================================================================+Title: "Survival in the Snow: A Bison's Battle Against Wolves"+Description:+Witness the raw power of nature in this gripping video showcasing a dramatic+encounter between a lone bison and a pack of wolves in a snowy wilderness. As+the harsh winter blankets the landscape, the struggle for survival+intensifies. Watch as the bison, isolated from its herd, faces the relentless+pursuit of hungry wolves. The tension escalates as the wolves coordinate+their attack, attempting to overcome the bison with their numbers and+strategic movements. Experience the breathtaking and brutal moments of this+wildlife interaction, where every second is a fight for survival. This video+captures the fierce beauty and the stark realities of life in the wild. Join+us in observing these incredible animals and the instinctual battles that+unfold in the heart of winter's grasp.+===============================================================================+"""diff --git a/examples/vision/object_recognition.py b/examples/vision/object_recognition.pyindex dbefb6dbe..2f789b3d6 100644--- a/examples/vision/object_recognition.py+++ b/examples/vision/object_recognition.py@@ -45,10 +45,11 @@ def detect_image_obj(image_path: str) -> None:assistant_sys_msg,model_type=ModelType.GPT_4_TURBO,)+ image_list = [Image.open(image_path)]user_msg = BaseMessage.make_user_message(role_name="User",content="Please start the object detection for following image!",- image=Image.open(image_path),+ image_list=image_list,image_detail="high",)assistant_response = agent.step(user_msg)diff --git a/poetry.lock b/poetry.lockindex bd620f3bd..9ef338067 100644--- a/poetry.lock+++ b/poetry.lock@@ -1912,13 +1912,13 @@ socks = ["socksio (==1.*)"][[package]]name = "huggingface-hub"-version = "0.23.3"+version = "0.23.4"description = "Client library to download and publish models, datasets and other repos on the huggingface.co hub"optional = falsepython-versions = ">=3.8.0"files = [- {file = "huggingface_hub-0.23.3-py3-none-any.whl", hash = "sha256:22222c41223f1b7c209ae5511d2d82907325a0e3cdbce5f66949d43c598ff3bc"},- {file = "huggingface_hub-0.23.3.tar.gz", hash = "sha256:1a1118a0b3dea3bab6c325d71be16f5ffe441d32f3ac7c348d6875911b694b5b"},+ {file = "huggingface_hub-0.23.4-py3-none-any.whl", hash = "sha256:3a0b957aa87150addf0cc7bd71b4d954b78e749850e1e7fb29ebbd2db64ca037"},+ {file = "huggingface_hub-0.23.4.tar.gz", hash = "sha256:35d99016433900e44ae7efe1c209164a5a81dbbcd53a52f99c281dcd7ce22431"},][package.dependencies]@@ -1994,6 +1994,38 @@ files = [{file = "idna-3.7.tar.gz", hash = "sha256:028ff3aadf0609c1fd278d8ea3089299412a7a8b9bd005dd08b9f8285bcb5cfc"},]+[[package]]+name = "imageio"+version = "2.34.1"+description = "Library for reading and writing a wide range of image, video, scientific, and volumetric data formats."+optional = true+python-versions = ">=3.8"+files = [+ {file = "imageio-2.34.1-py3-none-any.whl", hash = "sha256:408c1d4d62f72c9e8347e7d1ca9bc11d8673328af3913868db3b828e28b40a4c"},+ {file = "imageio-2.34.1.tar.gz", hash = "sha256:f13eb76e4922f936ac4a7fec77ce8a783e63b93543d4ea3e40793a6cabd9ac7d"},+]++[package.dependencies]+numpy = "*"+pillow = ">=8.3.2"++[package.extras]+all-plugins = ["astropy", "av", "imageio-ffmpeg", "pillow-heif", "psutil", "tifffile"]+all-plugins-pypy = ["av", "imageio-ffmpeg", "pillow-heif", "psutil", "tifffile"]+build = ["wheel"]+dev = ["black", "flake8", "fsspec[github]", "pytest", "pytest-cov"]+docs = ["numpydoc", "pydata-sphinx-theme", "sphinx (<6)"]+ffmpeg = ["imageio-ffmpeg", "psutil"]+fits = ["astropy"]+full = ["astropy", "av", "black", "flake8", "fsspec[github]", "gdal", "imageio-ffmpeg", "itk", "numpydoc", "pillow-heif", "psutil", "pydata-sphinx-theme", "pytest", "pytest-cov", "sphinx (<6)", "tifffile", "wheel"]+gdal = ["gdal"]+itk = ["itk"]+linting = ["black", "flake8"]+pillow-heif = ["pillow-heif"]+pyav = ["av"]+test = ["fsspec[github]", "pytest", "pytest-cov"]+tifffile = ["tifffile"]+[[package]]name = "imagesize"version = "1.4.1"@@ -3508,57 +3540,57 @@ et-xmlfile = "*"[[package]]name = "orjson"-version = "3.10.4"+version = "3.10.5"description = "Fast, correct Python JSON library supporting dataclasses, datetimes, and numpy"optional = falsepython-versions = ">=3.8"files = [- {file = "orjson-3.10.4-cp310-cp310-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:afca963f19ca60c7aedadea9979f769139127288dd58ccf3f7c5e8e6dc62cabf"},- {file = "orjson-3.10.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:42b112eff36ba7ccc7a9d6b87e17b9d6bde4312d05e3ddf66bf5662481dee846"},- {file = "orjson-3.10.4-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:02b192eaba048b1039eca9a0cef67863bd5623042f5c441889a9957121d97e14"},- {file = "orjson-3.10.4-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:827c3d0e4fc44242c82bfdb1a773235b8c0575afee99a9fa9a8ce920c14e440f"},- {file = "orjson-3.10.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ca8ec09724f10ec209244caeb1f9f428b6bb03f2eda9ed5e2c4dd7f2b7fabd44"},- {file = "orjson-3.10.4-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:8eaa5d531a8fde11993cbcb27e9acf7d9c457ba301adccb7fa3a021bfecab46c"},- {file = "orjson-3.10.4-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:e112aa7fc4ea67367ec5e86c39a6bb6c5719eddc8f999087b1759e765ddaf2d4"},- {file = "orjson-3.10.4-cp310-none-win32.whl", hash = "sha256:1538844fb88446c42da3889f8c4ecce95a630b5a5ba18ecdfe5aea596f4dff21"},- {file = "orjson-3.10.4-cp310-none-win_amd64.whl", hash = "sha256:de02811903a2e434127fba5389c3cc90f689542339a6e52e691ab7f693407b5a"},- {file = "orjson-3.10.4-cp311-cp311-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:358afaec75de7237dfea08e6b1b25d226e33a1e3b6dc154fc99eb697f24a1ffa"},- {file = "orjson-3.10.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bb4e292c3198ab3d93e5f877301d2746be4ca0ba2d9c513da5e10eb90e19ff52"},- {file = "orjson-3.10.4-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5c39e57cf6323a39238490092985d5d198a7da4a3be013cc891a33fef13a536e"},- {file = "orjson-3.10.4-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f86df433fc01361ff9270ad27455ce1ad43cd05e46de7152ca6adb405a16b2f6"},- {file = "orjson-3.10.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0c9966276a2c97e93e6cbe8286537f88b2a071827514f0d9d47a0aefa77db458"},- {file = "orjson-3.10.4-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:c499a14155a1f5a1e16e0cd31f6cf6f93965ac60a0822bc8340e7e2d3dac1108"},- {file = "orjson-3.10.4-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:3087023ce904a327c29487eb7e1f2c060070e8dbb9a3991b8e7952a9c6e62f38"},- {file = "orjson-3.10.4-cp311-none-win32.whl", hash = "sha256:f965893244fe348b59e5ce560693e6dd03368d577ce26849b5d261ce31c70101"},- {file = "orjson-3.10.4-cp311-none-win_amd64.whl", hash = "sha256:c212f06fad6aa6ce85d5665e91a83b866579f29441a47d3865c57329c0857357"},- {file = "orjson-3.10.4-cp312-cp312-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:d0965a8b0131959833ca8a65af60285995d57ced0de2fd8f16fc03235975d238"},- {file = "orjson-3.10.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:27b64695d9f2aef3ae15a0522e370ec95c946aaea7f2c97a1582a62b3bdd9169"},- {file = "orjson-3.10.4-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:867d882ddee6a20be4c8b03ae3d2b0333894d53ad632d32bd9b8123649577171"},- {file = "orjson-3.10.4-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a0667458f8a8ceb6dee5c08fec0b46195f92c474cbbec71dca2a6b7fd5b67b8d"},- {file = "orjson-3.10.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a3eac9befc4eaec1d1ff3bba6210576be4945332dde194525601c5ddb5c060d3"},- {file = "orjson-3.10.4-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:4343245443552eae240a33047a6d1bcac7a754ad4b1c57318173c54d7efb9aea"},- {file = "orjson-3.10.4-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:30153e269eea43e98918d4d462a36a7065031d9246407dfff2579a4e457515c1"},- {file = "orjson-3.10.4-cp312-none-win32.whl", hash = "sha256:1a7d092ee043abf3db19c2183115e80676495c9911843fdb3ebd48ca7b73079e"},- {file = "orjson-3.10.4-cp312-none-win_amd64.whl", hash = "sha256:07a2adbeb8b9efe6d68fc557685954a1f19d9e33f5cc018ae1a89e96647c1b65"},- {file = "orjson-3.10.4-cp38-cp38-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:f5a746f3d908bce1a1e347b9ca89864047533bdfab5a450066a0315f6566527b"},- {file = "orjson-3.10.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:465b4a8a3e459f8d304c19071b4badaa9b267c59207a005a7dd9dfe13d3a423f"},- {file = "orjson-3.10.4-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:35858d260728c434a3d91b60685ab32418318567e8902039837e1c2af2719e0b"},- {file = "orjson-3.10.4-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8a5ba090d40c4460312dd69c232b38c2ff67a823185cfe667e841c9dd5c06841"},- {file = "orjson-3.10.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5dde86755d064664e62e3612a166c28298aa8dfd35a991553faa58855ae739cc"},- {file = "orjson-3.10.4-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:020a9e9001cfec85c156ef3b185ff758b62ef986cefdb8384c4579facd5ce126"},- {file = "orjson-3.10.4-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:3bf8e6e3388a2e83a86466c912387e0f0a765494c65caa7e865f99969b76ba0d"},- {file = "orjson-3.10.4-cp38-none-win32.whl", hash = "sha256:c5a1cca6a4a3129db3da68a25dc0a459a62ae58e284e363b35ab304202d9ba9e"},- {file = "orjson-3.10.4-cp38-none-win_amd64.whl", hash = "sha256:ecd97d98d7bee3e3d51d0b51c92c457f05db4993329eea7c69764f9820e27eb3"},- {file = "orjson-3.10.4-cp39-cp39-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:71362daa330a2fc85553a1469185ac448547392a8f83d34e67779f8df3a52743"},- {file = "orjson-3.10.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d24b59d1fecb0fd080c177306118a143f7322335309640c55ed9580d2044e363"},- {file = "orjson-3.10.4-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e906670aea5a605b083ebb58d575c35e88cf880fa372f7cedaac3d51e98ff164"},- {file = "orjson-3.10.4-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7ce32ed4bc4d632268e4978e595fe5ea07e026b751482b4a0feec48f66a90abc"},- {file = "orjson-3.10.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1dcd34286246e0c5edd0e230d1da2daab2c1b465fcb6bac85b8d44057229d40a"},- {file = "orjson-3.10.4-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:c45d4b8c403e50beedb1d006a8916d9910ed56bceaf2035dc253618b44d0a161"},- {file = "orjson-3.10.4-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:aaed3253041b5002a4f5bfdf6f7b5cce657d974472b0699a469d439beba40381"},- {file = "orjson-3.10.4-cp39-none-win32.whl", hash = "sha256:9a4f41b7dbf7896f8dbf559b9b43dcd99e31e0d49ac1b59d74f52ce51ab10eb9"},- {file = "orjson-3.10.4-cp39-none-win_amd64.whl", hash = "sha256:6c4eb7d867ed91cb61e6514cb4f457aa01d7b0fd663089df60a69f3d38b69d4c"},- {file = "orjson-3.10.4.tar.gz", hash = "sha256:c912ed25b787c73fe994a5decd81c3f3b256599b8a87d410d799d5d52013af2a"},+ {file = "orjson-3.10.5-cp310-cp310-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:545d493c1f560d5ccfc134803ceb8955a14c3fcb47bbb4b2fee0232646d0b932"},+ {file = "orjson-3.10.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f4324929c2dd917598212bfd554757feca3e5e0fa60da08be11b4aa8b90013c1"},+ {file = "orjson-3.10.5-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8c13ca5e2ddded0ce6a927ea5a9f27cae77eee4c75547b4297252cb20c4d30e6"},+ {file = "orjson-3.10.5-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b6c8e30adfa52c025f042a87f450a6b9ea29649d828e0fec4858ed5e6caecf63"},+ {file = "orjson-3.10.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:338fd4f071b242f26e9ca802f443edc588fa4ab60bfa81f38beaedf42eda226c"},+ {file = "orjson-3.10.5-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:6970ed7a3126cfed873c5d21ece1cd5d6f83ca6c9afb71bbae21a0b034588d96"},+ {file = "orjson-3.10.5-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:235dadefb793ad12f7fa11e98a480db1f7c6469ff9e3da5e73c7809c700d746b"},+ {file = "orjson-3.10.5-cp310-none-win32.whl", hash = "sha256:be79e2393679eda6a590638abda16d167754393f5d0850dcbca2d0c3735cebe2"},+ {file = "orjson-3.10.5-cp310-none-win_amd64.whl", hash = "sha256:c4a65310ccb5c9910c47b078ba78e2787cb3878cdded1702ac3d0da71ddc5228"},+ {file = "orjson-3.10.5-cp311-cp311-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:cdf7365063e80899ae3a697def1277c17a7df7ccfc979990a403dfe77bb54d40"},+ {file = "orjson-3.10.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6b68742c469745d0e6ca5724506858f75e2f1e5b59a4315861f9e2b1df77775a"},+ {file = "orjson-3.10.5-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7d10cc1b594951522e35a3463da19e899abe6ca95f3c84c69e9e901e0bd93d38"},+ {file = "orjson-3.10.5-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:dcbe82b35d1ac43b0d84072408330fd3295c2896973112d495e7234f7e3da2e1"},+ {file = "orjson-3.10.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:10c0eb7e0c75e1e486c7563fe231b40fdd658a035ae125c6ba651ca3b07936f5"},+ {file = "orjson-3.10.5-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:53ed1c879b10de56f35daf06dbc4a0d9a5db98f6ee853c2dbd3ee9d13e6f302f"},+ {file = "orjson-3.10.5-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:099e81a5975237fda3100f918839af95f42f981447ba8f47adb7b6a3cdb078fa"},+ {file = "orjson-3.10.5-cp311-none-win32.whl", hash = "sha256:1146bf85ea37ac421594107195db8bc77104f74bc83e8ee21a2e58596bfb2f04"},+ {file = "orjson-3.10.5-cp311-none-win_amd64.whl", hash = "sha256:36a10f43c5f3a55c2f680efe07aa93ef4a342d2960dd2b1b7ea2dd764fe4a37c"},+ {file = "orjson-3.10.5-cp312-cp312-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:68f85ecae7af14a585a563ac741b0547a3f291de81cd1e20903e79f25170458f"},+ {file = "orjson-3.10.5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:28afa96f496474ce60d3340fe8d9a263aa93ea01201cd2bad844c45cd21f5268"},+ {file = "orjson-3.10.5-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9cd684927af3e11b6e754df80b9ffafd9fb6adcaa9d3e8fdd5891be5a5cad51e"},+ {file = "orjson-3.10.5-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3d21b9983da032505f7050795e98b5d9eee0df903258951566ecc358f6696969"},+ {file = "orjson-3.10.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1ad1de7fef79736dde8c3554e75361ec351158a906d747bd901a52a5c9c8d24b"},+ {file = "orjson-3.10.5-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:2d97531cdfe9bdd76d492e69800afd97e5930cb0da6a825646667b2c6c6c0211"},+ {file = "orjson-3.10.5-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:d69858c32f09c3e1ce44b617b3ebba1aba030e777000ebdf72b0d8e365d0b2b3"},+ {file = "orjson-3.10.5-cp312-none-win32.whl", hash = "sha256:64c9cc089f127e5875901ac05e5c25aa13cfa5dbbbd9602bda51e5c611d6e3e2"},+ {file = "orjson-3.10.5-cp312-none-win_amd64.whl", hash = "sha256:b2efbd67feff8c1f7728937c0d7f6ca8c25ec81373dc8db4ef394c1d93d13dc5"},+ {file = "orjson-3.10.5-cp38-cp38-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:03b565c3b93f5d6e001db48b747d31ea3819b89abf041ee10ac6988886d18e01"},+ {file = "orjson-3.10.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:584c902ec19ab7928fd5add1783c909094cc53f31ac7acfada817b0847975f26"},+ {file = "orjson-3.10.5-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5a35455cc0b0b3a1eaf67224035f5388591ec72b9b6136d66b49a553ce9eb1e6"},+ {file = "orjson-3.10.5-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1670fe88b116c2745a3a30b0f099b699a02bb3482c2591514baf5433819e4f4d"},+ {file = "orjson-3.10.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:185c394ef45b18b9a7d8e8f333606e2e8194a50c6e3c664215aae8cf42c5385e"},+ {file = "orjson-3.10.5-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:ca0b3a94ac8d3886c9581b9f9de3ce858263865fdaa383fbc31c310b9eac07c9"},+ {file = "orjson-3.10.5-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:dfc91d4720d48e2a709e9c368d5125b4b5899dced34b5400c3837dadc7d6271b"},+ {file = "orjson-3.10.5-cp38-none-win32.whl", hash = "sha256:c05f16701ab2a4ca146d0bca950af254cb7c02f3c01fca8efbbad82d23b3d9d4"},+ {file = "orjson-3.10.5-cp38-none-win_amd64.whl", hash = "sha256:8a11d459338f96a9aa7f232ba95679fc0c7cedbd1b990d736467894210205c09"},+ {file = "orjson-3.10.5-cp39-cp39-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:85c89131d7b3218db1b24c4abecea92fd6c7f9fab87441cfc342d3acc725d807"},+ {file = "orjson-3.10.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fb66215277a230c456f9038d5e2d84778141643207f85336ef8d2a9da26bd7ca"},+ {file = "orjson-3.10.5-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:51bbcdea96cdefa4a9b4461e690c75ad4e33796530d182bdd5c38980202c134a"},+ {file = "orjson-3.10.5-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:dbead71dbe65f959b7bd8cf91e0e11d5338033eba34c114f69078d59827ee139"},+ {file = "orjson-3.10.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5df58d206e78c40da118a8c14fc189207fffdcb1f21b3b4c9c0c18e839b5a214"},+ {file = "orjson-3.10.5-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:c4057c3b511bb8aef605616bd3f1f002a697c7e4da6adf095ca5b84c0fd43595"},+ {file = "orjson-3.10.5-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:b39e006b00c57125ab974362e740c14a0c6a66ff695bff44615dcf4a70ce2b86"},+ {file = "orjson-3.10.5-cp39-none-win32.whl", hash = "sha256:eded5138cc565a9d618e111c6d5c2547bbdd951114eb822f7f6309e04db0fb47"},+ {file = "orjson-3.10.5-cp39-none-win_amd64.whl", hash = "sha256:cc28e90a7cae7fcba2493953cff61da5a52950e78dc2dacfe931a317ee3d8de7"},+ {file = "orjson-3.10.5.tar.gz", hash = "sha256:7a5baef8a4284405d96c90c7c62b755e9ef1ada84c2406c24a9ebec86b89f46d"},][[package]]@@ -5713,13 +5745,13 @@ files = [[[package]]name = "slack-sdk"-version = "3.28.0"+version = "3.29.0"description = "The Slack API Platform SDK for Python"optional = truepython-versions = ">=3.6"files = [- {file = "slack_sdk-3.28.0-py2.py3-none-any.whl", hash = "sha256:1a47700ae20566575ce494d1d1b6f594b011d06aad28e3b8e28c052cad1d6c4c"},- {file = "slack_sdk-3.28.0.tar.gz", hash = "sha256:e6ece5cb70850492637e002e3b0d26d307939f4a33203b88cb274f7475c9a144"},+ {file = "slack_sdk-3.29.0-py2.py3-none-any.whl", hash = "sha256:1857300b9bdd5cd43eb527a0dd8c6415aa0623cd76e153bf167e93968efd5121"},+ {file = "slack_sdk-3.29.0.tar.gz", hash = "sha256:a6ad02fd23a7c70ded7e48e0fe317e269820e64e55069699cc75d64fb2ebf5a1"},][package.extras]@@ -7451,16 +7483,16 @@ doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linketest = ["big-O", "importlib-resources", "jaraco.functools", "jaraco.itertools", "jaraco.test", "more-itertools", "pytest (>=6,!=8.1.*)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-ignore-flaky", "pytest-mypy", "pytest-ruff (>=0.2.1)"][extras]-all = ["PyMuPDF", "accelerate", "beautifulsoup4", "cohere", "datasets", "diffusers", "discord.py", "docx2txt", "duckduckgo-search", "googlemaps", "neo4j", "newspaper3k", "openapi-spec-validator", "opencv-python", "pillow", "prance", "pyTelegramBotAPI", "pydub", "pygithub", "pymilvus", "pyowm", "qdrant-client", "rank-bm25", "requests_oauthlib", "sentence-transformers", "sentencepiece", "slack-sdk", "soundfile", "torch", "transformers", "unstructured", "wikipedia", "wolframalpha"]+all = ["PyMuPDF", "accelerate", "beautifulsoup4", "cohere", "datasets", "diffusers", "discord.py", "docx2txt", "duckduckgo-search", "googlemaps", "imageio", "neo4j", "newspaper3k", "openapi-spec-validator", "opencv-python", "pillow", "prance", "pyTelegramBotAPI", "pydub", "pygithub", "pymilvus", "pyowm", "qdrant-client", "rank-bm25", "requests_oauthlib", "sentence-transformers", "sentencepiece", "slack-sdk", "soundfile", "torch", "transformers", "unstructured", "wikipedia", "wolframalpha"]encoders = ["sentence-transformers"]graph-storages = ["neo4j"]huggingface-agent = ["accelerate", "datasets", "diffusers", "opencv-python", "sentencepiece", "soundfile", "torch", "transformers"]retrievers = ["cohere", "rank-bm25"]test = ["mock", "pytest", "pytest-asyncio"]-tools = ["PyMuPDF", "beautifulsoup4", "discord.py", "docx2txt", "duckduckgo-search", "googlemaps", "newspaper3k", "openapi-spec-validator", "pillow", "prance", "pyTelegramBotAPI", "pydub", "pygithub", "pyowm", "requests_oauthlib", "slack-sdk", "unstructured", "wikipedia", "wolframalpha"]+tools = ["PyMuPDF", "beautifulsoup4", "discord.py", "docx2txt", "duckduckgo-search", "googlemaps", "imageio", "newspaper3k", "openapi-spec-validator", "pillow", "prance", "pyTelegramBotAPI", "pydub", "pygithub", "pyowm", "requests_oauthlib", "slack-sdk", "unstructured", "wikipedia", "wolframalpha"]vector-databases = ["pymilvus", "qdrant-client"][metadata]lock-version = "2.0"python-versions = ">=3.8.1,<3.12"-content-hash = "ff374e50bbecbf3f2502f2f5ba4a794390e1d99a74bb538218e3a120f36f6871"+content-hash = "a63364a15ab4f42e42adb0f07bb458ac00d0c49e1d39320492b98d943be8a743"diff --git a/pyproject.toml b/pyproject.tomlindex 0fafac6a1..ec7a76100 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -68,6 +68,7 @@ pillow = { version = "^10.2.0", optional = true }slack-sdk = { version = "^3.27.2", optional = true }pydub = { version = "^0.25.1", optional = true }pygithub = { version = "^2.3.0", optional = true }+imageio = { version = "^2.34.1", optional = true }pyTelegramBotAPI = { version = "^4.18.0", optional = true }"discord.py" = { version = "^2.3.2", optional = true }@@ -90,7 +91,6 @@ pytest = { version = "^7", optional = true}pytest-asyncio = { version = "^0.23.0", optional = true }mock = { version = "^5", optional = true}-[tool.poetry.extras]test = ["pytest", "mock", "pytest-asyncio"]@@ -123,6 +123,7 @@ tools = ["prance","openapi-spec-validator","unstructured",+ "imageio","pillow","slack-sdk","pydub",@@ -172,6 +173,7 @@ all = ["prance","openapi-spec-validator","unstructured",+ "imageio","slack-sdk","pydub",# vector-database@@ -298,6 +300,7 @@ module = ["fitz","qdrant_client.*","unstructured.*",+ "imageio","rank_bm25","cohere","sentence_transformers.*",diff --git a/test/agents/test_chat_agent.py b/test/agents/test_chat_agent.pyindex 20ff53fee..602ce771b 100644--- a/test/agents/test_chat_agent.py+++ b/test/agents/test_chat_agent.py@@ -506,16 +506,18 @@ def test_chat_agent_vision():# Create an all blue PNG image:image = Image.new("RGB", (100, 100), "blue")+ image_list = []img_byte_arr = BytesIO()image.save(img_byte_arr, format='PNG')image = Image.open(img_byte_arr)+ image_list.append(image)user_msg = BaseMessage(role_name="User",role_type=RoleType.USER,meta_dict=dict(),content="Is this image blue? Just answer yes or no.",- image=image,+ image_list=image_list,image_detail="low",)# Mock the OpenAI model return value:diff --git a/test/functions/tempory_storage/.lock b/test/functions/tempory_storage/.locknew file mode 100644index 000000000..a4b31f429--- /dev/null+++ b/test/functions/tempory_storage/.lock@@ -0,0 +1 @@+tmp lock file\ No newline at end of filediff --git a/test/functions/tempory_storage/collection/collection/storage.sqlite b/test/functions/tempory_storage/collection/collection/storage.sqlitenew file mode 100644index 000000000..fc555fcdbBinary files /dev/null and b/test/functions/tempory_storage/collection/collection/storage.sqlite differdiff --git a/test/functions/tempory_storage/collection/www_camel_ai_org/storage.sqlite b/test/functions/tempory_storage/collection/www_camel_ai_org/storage.sqlitenew file mode 100644index 000000000..fc555fcdbBinary files /dev/null and b/test/functions/tempory_storage/collection/www_camel_ai_org/storage.sqlite differdiff --git a/test/utils/test_token_counting.py b/test/utils/test_token_counting.pyindex f80425d2e..bcaae1518 100644--- a/test/utils/test_token_counting.py+++ b/test/utils/test_token_counting.py@@ -14,21 +14,21 @@import pytestfrom PIL import Image-from camel.types import OpenAIImageDetailType+from camel.types import OpenAIVisionDetailTypefrom camel.utils.token_counting import count_tokens_from_image@pytest.mark.parametrize("width,height,detail,token_cost",[- (1024, 1024, OpenAIImageDetailType.HIGH, 765),- (1024, 1024, OpenAIImageDetailType.AUTO, 765),- (2048, 4096, OpenAIImageDetailType.HIGH, 1105),- (2048, 4096, OpenAIImageDetailType.LOW, 85),+ (1024, 1024, OpenAIVisionDetailType.HIGH, 765),+ (1024, 1024, OpenAIVisionDetailType.AUTO, 765),+ (2048, 4096, OpenAIVisionDetailType.HIGH, 1105),+ (2048, 4096, OpenAIVisionDetailType.LOW, 85),],)def test_openai_count_token_from_image(- width: int, height: int, detail: OpenAIImageDetailType, token_cost: int+ width: int, height: int, detail: OpenAIVisionDetailType, token_cost: int):image = Image.new("RGB", (width, height), "black")assert count_tokens_from_image(image, detail) == token_cost