From b2b11f2fa4d8c6b93a91e0681e647488f1e7638b Mon Sep 17 00:00:00 2001 From: wwakabobik Date: Tue, 17 Oct 2023 18:22:33 +0200 Subject: [PATCH] 0.2 - fix testing --- .github/workflows/linters.yml | 2 +- __init__.py | 6 ++++-- __main__.py | 5 +++-- examples/image_generation/gpt_functions.py | 2 +- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index 340c366..08d79b5 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.9", "3.10", "3.11.5"] + python-version: ["3.10", "3.11"] steps: - name: Checkout uses: actions/checkout@v3 diff --git a/__init__.py b/__init__.py index 7fa3b4d..1f605c8 100644 --- a/__init__.py +++ b/__init__.py @@ -5,7 +5,7 @@ Copyright (c) 2023. All rights reserved. Created: 25.08.2023 -Last Modified: 16.09.2023 +Last Modified: 17.10.2023 Description: This file is init point for project-wide structure. @@ -14,7 +14,9 @@ # Engines from .openai_api.src.openai_api.chatgpt import ChatGPT # pylint: disable=unused-import from .openai_api.src.openai_api.dalle import DALLE # pylint: disable=unused-import -from .leonardo_api import Leonardo, LeonardoAsync # pylint: disable=unused-import +from .leonardo_api.src.leonardo_api.leonardo_sync import Leonardo # pylint: disable=unused-import +from .leonardo_api.src.leonardo_api.leonardo_async import Leonardo as LeonardoAsync # pylint: disable=unused-import + # Utils from .utils.tts import CustomTTS # pylint: disable=unused-import diff --git a/__main__.py b/__main__.py index 1f4e81e..a86a2ee 100644 --- a/__main__.py +++ b/__main__.py @@ -5,7 +5,7 @@ Copyright (c) 2023. All rights reserved. Created: 25.08.2023 -Last Modified: 16.09.2023 +Last Modified: 17.10.2023 Description: This file is entry point for project-wide structure. @@ -14,7 +14,8 @@ # Engines from .openai_api.src.openai_api.chatgpt import ChatGPT # pylint: disable=unused-import from .openai_api.src.openai_api.dalle import DALLE # pylint: disable=unused-import -from .leonardo_api import Leonardo, LeonardoAsync # pylint: disable=unused-import +from .leonardo_api.src.leonardo_api.leonardo_sync import Leonardo # pylint: disable=unused-import +from .leonardo_api.src.leonardo_api.leonardo_async import Leonardo as LeonardoAsync # pylint: disable=unused-import # Utils from .utils.tts import CustomTTS # pylint: disable=unused-import diff --git a/examples/image_generation/gpt_functions.py b/examples/image_generation/gpt_functions.py index 17eacca..7cf1f41 100644 --- a/examples/image_generation/gpt_functions.py +++ b/examples/image_generation/gpt_functions.py @@ -32,7 +32,7 @@ def get_weather(city, units): """ base_url = "http://api.openweathermap.org/data/2.5/weather" params = {"q": city, "appid": "93171b03384f92ee3c55873452a49c7c", "units": units} - response = requests.get(base_url, params=params) + response = requests.get(base_url, params=params, timeout=30) data = response.json() return data