š« 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
fix: Support Text to BaseModel (#1241)
Wendong-Fan6f2bf23f1837
diff --git a/camel/schemas/__init__.py b/camel/schemas/__init__.pyindex dacbaaeb5..7908e0c99 100644--- a/camel/schemas/__init__.py+++ b/camel/schemas/__init__.py@@ -11,19 +11,7 @@# See the License for the specific language governing permissions and# limitations under the License.# ========= Copyright 2023-2024 @ CAMEL-AI.org. All Rights Reserved. =========-# =========== 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 .openai_converter import OpenAISchemaConverter__all__ = ["OpenAISchemaConverter"]diff --git a/camel/schemas/base.py b/camel/schemas/base.pyindex d3ca113aa..d8ad9a0c8 100644--- a/camel/schemas/base.py+++ b/camel/schemas/base.py@@ -11,19 +11,7 @@# See the License for the specific language governing permissions and# limitations under the License.# ========= Copyright 2023-2024 @ CAMEL-AI.org. All Rights Reserved. =========-# =========== 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 abc import ABC, abstractmethodfrom typing import Any, Dictdiff --git a/camel/schemas/openai_converter.py b/camel/schemas/openai_converter.pyindex 8c80a675d..cf0df72a5 100644--- a/camel/schemas/openai_converter.py+++ b/camel/schemas/openai_converter.py@@ -11,19 +11,6 @@# See the License for the specific language governing permissions and# limitations under the License.# ========= Copyright 2023-2024 @ CAMEL-AI.org. All Rights Reserved. =========-# =========== 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. ===========import osfrom typing import Any, Callable, Dict, Optional, Type, Union@@ -47,8 +34,8 @@ DEFAULT_CONVERTER_PROMPTS = """class OpenAISchemaConverter(BaseConverter):- r"""OpenAISchemaConverter is a class that- converts a string or a function into a BaseModel schema.+ r"""OpenAISchemaConverter is a class that converts a string or a function+ into a BaseModel schema.Args:model_type (ModelType, optional): The model type to be used.diff --git a/camel/utils/response_format.py b/camel/utils/response_format.pyindex c9014c9dd..80e6b5248 100644--- a/camel/utils/response_format.py+++ b/camel/utils/response_format.py@@ -11,19 +11,6 @@# See the License for the specific language governing permissions and# limitations under the License.# ========= Copyright 2023-2024 @ CAMEL-AI.org. All Rights Reserved. =========-# =========== 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 __future__ import annotationsdiff --git a/examples/schema_outputs/openai_converter_example.py b/examples/schema_outputs/openai_converter_example.pyindex 6e3da9630..b9c88b6c9 100644--- a/examples/schema_outputs/openai_converter_example.py+++ b/examples/schema_outputs/openai_converter_example.py@@ -11,19 +11,6 @@# See the License for the specific language governing permissions and# limitations under the License.# ========= Copyright 2023-2024 @ CAMEL-AI.org. All Rights Reserved. =========-# =========== 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 pydantic import BaseModeldiff --git a/test/schema_outputs/test_openai_converter.py b/test/schema_outputs/test_openai_converter.pyindex 1b3b21ea3..2ed0f4ac9 100644--- a/test/schema_outputs/test_openai_converter.py+++ b/test/schema_outputs/test_openai_converter.py@@ -11,19 +11,6 @@# See the License for the specific language governing permissions and# limitations under the License.# ========= Copyright 2023-2024 @ CAMEL-AI.org. All Rights Reserved. =========-# =========== 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 pydantic import BaseModel