diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8dfae80..27e21d1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,9 +4,9 @@ repos: hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix, --show-fixes] - exclude: ^docs/cookbooks/ # Ignore files under docs/cookbooks + exclude: ^(docs/cookbooks/|community_usecase/) # Ignore files under docs/cookbooks and community_usecase - id: ruff-format - exclude: ^docs/cookbooks/ # Ignore files under docs/cookbooks + exclude: ^(docs/cookbooks/|community_usecase/) # Ignore files under docs/cookbooks and community_usecase - repo: local hooks: @@ -17,7 +17,7 @@ repos: types: [python] pass_filenames: false require_serial: true - exclude: ^docs/cookbooks/ # Ignore files under docs/cookbooks + exclude: ^(docs/cookbooks/|community_usecase/) # Ignore files under docs/cookbooks and community_usecase - repo: local hooks: @@ -26,7 +26,7 @@ repos: entry: python licenses/update_license.py . licenses/license_template.txt language: system types: [python] - exclude: ^docs/cookbooks/ # Ignore files under docs/cookbooks + exclude: ^(docs/cookbooks/|community_usecase/) # Ignore files under docs/cookbooks and community_usecase - repo: https://github.com/codespell-project/codespell # Configuration for codespell is in pyproject.toml diff --git a/examples/run_mistral.py b/examples/run_mistral.py index 03e203a..1d9935a 100644 --- a/examples/run_mistral.py +++ b/examples/run_mistral.py @@ -1,3 +1,16 @@ +# ========= 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. ========= import sys import pathlib from dotenv import load_dotenv @@ -132,4 +145,4 @@ def main(): if __name__ == "__main__": - main() \ No newline at end of file + main() diff --git a/examples/run_together_ai.py b/examples/run_together_ai.py index dfd9600..59c6eaf 100644 --- a/examples/run_together_ai.py +++ b/examples/run_together_ai.py @@ -16,12 +16,9 @@ import pathlib from dotenv import load_dotenv from camel.models import ModelFactory from camel.toolkits import ( - AudioAnalysisToolkit, CodeExecutionToolkit, ExcelToolkit, ImageAnalysisToolkit, - SearchToolkit, - VideoAnalysisToolkit, BrowserToolkit, FileWriteToolkit, ) diff --git a/licenses/update_license.py b/licenses/update_license.py index af5840e..e6086ce 100644 --- a/licenses/update_license.py +++ b/licenses/update_license.py @@ -92,6 +92,9 @@ def update_license_in_directory( continue if any(part.startswith(".") for part in py_files.parts): continue + # Skip files in the community_usecase directory + if "community_usecase" in py_files.parts: + continue if update_license_in_file( py_files, license_template_path, diff --git a/owl/webapp.py b/owl/webapp.py index 932de93..33f06b6 100644 --- a/owl/webapp.py +++ b/owl/webapp.py @@ -1300,7 +1300,12 @@ def main(): app = create_ui() app.queue() - app.launch(share=False, favicon_path=os.path.join(os.path.dirname(__file__), "assets", "owl-favicon.ico")) + app.launch( + share=False, + favicon_path=os.path.join( + os.path.dirname(__file__), "assets", "owl-favicon.ico" + ), + ) except Exception as e: logging.error(f"Error occurred while starting the application: {str(e)}") print(f"Error occurred while starting the application: {str(e)}") diff --git a/owl/webapp_jp.py b/owl/webapp_jp.py index 5071f75..d1c70ee 100644 --- a/owl/webapp_jp.py +++ b/owl/webapp_jp.py @@ -252,7 +252,7 @@ MODULE_DESCRIPTIONS = { "run_qwen_zh": "qwenモデルを使用して中国語タスクを処理します", "run_azure_openai": "Azure OpenAIモデルを使用してタスクを処理します", "run_groq": "groqモデルを使用してタスクを処理します", - "run_together_ai": "together aiモデルを使用してタスクを処理します" + "run_together_ai": "together aiモデルを使用してタスクを処理します", } @@ -1296,7 +1296,12 @@ def main(): app = create_ui() app.queue() - app.launch(share=False, favicon_path=os.path.join(os.path.dirname(__file__), "assets", "owl-favicon.ico")) + app.launch( + share=False, + favicon_path=os.path.join( + os.path.dirname(__file__), "assets", "owl-favicon.ico" + ), + ) except Exception as e: logging.error(f"アプリケーションの起動中にエラーが発生しました: {str(e)}") print(f"アプリケーションの起動中にエラーが発生しました: {str(e)}")