Skip to content

armgit / camel

Public Imported from GitHub
0

🐫 CAMEL: The first and the best multi-agent framework. Finding the Scaling Law of Agents. https://www.camel-ai.org

fix: Support Text to BaseModel (#1241)

Wendong-Fan6f2bf23f1837
diff --git a/camel/schemas/__init__.py b/camel/schemas/__init__.py
index 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.py
index 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, abstractmethod
from typing import Any, Dict
diff --git a/camel/schemas/openai_converter.py b/camel/schemas/openai_converter.py
index 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 os
from 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.py
index 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 annotations
diff --git a/examples/schema_outputs/openai_converter_example.py b/examples/schema_outputs/openai_converter_example.py
index 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 BaseModel
diff --git a/test/schema_outputs/test_openai_converter.py b/test/schema_outputs/test_openai_converter.py
index 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