From 4c10f3549a98330bbf8fe313c1d3404d3060a984 Mon Sep 17 00:00:00 2001 From: wwakabobik Date: Mon, 20 Nov 2023 19:32:24 +0100 Subject: [PATCH 1/4] Bump reqs --- requirements.txt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/requirements.txt b/requirements.txt index 76d6e0b..b6a9d0b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,23 +9,24 @@ SpeechRecognition==3.10.0 # Translator deep_translator==1.11.4 # Recorder -pyaudio==0.2.13 +pyaudio==0.2.14 sounddevice==0.4.6 soundfile==0.12.1 -numpy==1.26.1 +numpy==1.26.2 # Image pillow==10.1.0 # Articles readability==0.3.1 # Testing webdriver_manager==4.0.1 -selenium==4.15.1 +selenium==4.15.2 pytest==7.4.3 pytest-json-report==1.5.0 -pytest-xdist==3.3.1 +pytest-xdist==3.4.0 # Third-party-test -cohere==4.32 +cohere==4.35 llamaapi==0.1.36 # My AI APIs leonardo-api==0.0.7 openai-python-api==0.0.5 +ablt-python-api==0.0.1 \ No newline at end of file From a6f9bbae15d2a341f7f6dcee74fcc098c24ee6ed Mon Sep 17 00:00:00 2001 From: wwakabobik Date: Mon, 20 Nov 2023 20:14:29 +0100 Subject: [PATCH 2/4] v0.3 --- CHANGELOG.md | 12 ++++++ README.md | 57 ++++++++++++++++++++++++- examples/llm_api_comparison/__init__.py | 12 ++++++ requirements.txt | 2 +- 4 files changed, 80 insertions(+), 3 deletions(-) create mode 100644 examples/llm_api_comparison/__init__.py diff --git a/CHANGELOG.md b/CHANGELOG.md index 25c7595..3e693d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,7 +20,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [0.2] - 2023-10-15 +### Added +- Test generator +- page_retriever + ### Changed - Bumped submodules to latest versions - Added test project - Structure refactoring + + +## [0.3] - 2023-11_20 + +### Added +- Added README.md +- Bumped requirements +- Removed submodules (moved to requirements - OpenAI API, Leonardo API) diff --git a/README.md b/README.md index 2973a52..0685530 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,55 @@ -# ai_engines -Playground and utils libraries for AI stuff +# AI Engines + +This is playground and utils libraries for AI stuff. + +It is not a framework, but a collection of useful tools and examples. It's not a pinned repo, not a featured and supported, and in general violates all the best practices of software development. But it's a good place to start. At the beginning and the end of all, this repo contains stuff that I mentioned in my articles, thus, refer to [my blog](https://wwakabobik.github.io/) posts first. + +## What you can find here + +- [x] [**examples**](/examples) - a collection of examples of AI projects, including: + - [x] [image_generation](/examples/image_generation) - a simple example of image generation using DALLE and Leonardo + - [x] [speak_and_hear](/examples/speak_and_hear) - see [article](https://wwakabobik.github.io/2023/09/ai_learning_to_hear_and_speak/) first, this is LLM speech recognition and TTS example + - [x] [test_generator](/examples/test_generator) - see [article](https://wwakabobik.github.io/2023/10/qa_ai_practices_used_for_qa/) first, this is QA automatic tests generator + - [x] [llm_api_comparison](/examples/llm_api_comparison) - TBD +- [x] [**utils**](/utils) - a collection of useful tools for AI development, in general them all of them used in example projects: + - [x] [article_extractor](/utils/article_extractor.py) - limbo for article extraction from web pages + - [x] [audio_recorder](/utils/audio_recorder.py) - a simple audio recorder, used in speech recognition / TTS examples + - [x] [logger_config](/utils/logger_config.py) - general logger + - [x] [other](/utils/other.py) - all that doesn't fit in other files, i.e. env checkers + - [x] [page_retriever](/utils/page_retriever.py) - web page retriever and parser + - [x] [transcriptors](/utils/transcriptors.py) - custom transcriptors wrappers for speech recognition + - [x] [translators](/utils/translators.py) - custom translators for text translation wrappers + - [x] [tts](/utils/tts.py) - custom TTS engines wrappers + +## Running up that hill + +Once again, refer to [my blog](https://wwakabobik.github.io/) posts first. If you do so, you may try exec some top-level scripts from parent directory: + +```bash +git clone git@github.com:wwakabobik/ai_engines.git # clone this repo +cd ai_engines # go to repo directory +# It's highly recommended to use python 3.11+ and venv +python -m venv venv # create virtual environment +source venv/bin/activate # activate virtual environment +pip install -r requirements.txt # install dependencies +# then you may run some top-level script, like: +PYTHONPATH=. python -m examples.test_generator.generator_test +PYTHONPATH=. python -m examples.speak_and_hear.test_gpt +``` + +Well, in most cases you need to create cred file to run examples, so, create `creds.py` under `examples` directory and fill it with your credentials, like: + +```python +# -*- coding: utf-8 -*- +"""Creds file""" +oai_token = "alksjdlksajlkdjlajiouoieuoqijnc" +oai_organization = "slkahkdjshakjhfkjafs" +cohere_token = "saklljlkdjsaldjljasldjlsak" +llama_token="asiuoiduaosudouasosuoduoqoihicdhzch" +ablt_token="sadhsakhdajskhaskdkja" +claude_token="dkshjjsdhkjdshkjhskj" +openweathermap_appid = "salkdjaslkjldasjlkdasl" +midjourney_cookie="skjaklshkldfhkjsahjhfkjbkfsa" +``` + +GL&HF! diff --git a/examples/llm_api_comparison/__init__.py b/examples/llm_api_comparison/__init__.py new file mode 100644 index 0000000..77dbd46 --- /dev/null +++ b/examples/llm_api_comparison/__init__.py @@ -0,0 +1,12 @@ +# -*- coding: utf-8 -*- +""" +Filename: __init__.py +Author: Iliya Vereshchagin +Copyright (c) 2023. All rights reserved. + +Created: 20.11.2023 +Last Modified: 20.11.2023 + +Description: +This file is init file for llm_api_comparison package. +""" diff --git a/requirements.txt b/requirements.txt index b6a9d0b..650867d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -29,4 +29,4 @@ llamaapi==0.1.36 # My AI APIs leonardo-api==0.0.7 openai-python-api==0.0.5 -ablt-python-api==0.0.1 \ No newline at end of file +ablt-python-api==0.0.2 From 65a60108cd2c3b91f8106494c0c52764064e6517 Mon Sep 17 00:00:00 2001 From: wwakabobik Date: Mon, 20 Nov 2023 20:15:40 +0100 Subject: [PATCH 3/4] v0.3 --- .github/workflows/linters.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index 08d79b5..370bd1c 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.10", "3.11"] + python-version: ["3.10", "3.11", "3.12"] steps: - name: Checkout uses: actions/checkout@v3 From 0de371c87a213519413f822ee4ee3f80c1dfecf8 Mon Sep 17 00:00:00 2001 From: wwakabobik Date: Mon, 20 Nov 2023 20:16:11 +0100 Subject: [PATCH 4/4] v0.3 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e693d4..feb6d70 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,3 +36,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Added README.md - Bumped requirements - Removed submodules (moved to requirements - OpenAI API, Leonardo API) +- Added python 3.12 for linting