A package for handling GPT, embeddings, and data for an AI Assistant.
Project description
python version >= 3.10
Development
python3.10 -m venv .venv
pip install -r requirements.txt
Usage of the package
For using this package, a few environment variables are necessary to use certain functionalities of the package. For example, place them all in a .env
file, and load them in using package python-dotenv
:
from dotenv import load_dotenv
load_dotenv()
Full list of necessary variables:
Varibale name | description |
---|---|
AZURE_OPENAI_ENDPOINT | Endpoint to the Azure Open AI resource. |
AZURE_OPENAI_API_KEY | API-key to access the Azure Open AI resource. |
AZURE_OPENAI_CHAT_DEPLOYMENT_NAME | Name of the deployment of the chat completion model. |
AZURE_OPENAI_API_VERSION | API-versie azure Open AI resource. |
AZURE_OPENAI_EMBEDDINGS_DEPLOYMENT_NAME | Name of the deployment of the embedding model. |
WEVIATE_CLUSTER_ENDPOINT | Endpoint to the Weaviate cluster. |
WEVIATE_CLUSTER_API_KEY | API-key to access the Weaviate cluster. |
STORAGE_ACCOUNT_NAME | Name of the Azure Storage Account. |
STORAGE_ACCOUNT_KEY | Key to the Azure Storage Account |
STORAGE_ACCOUNT_CONTAINER_NAME | Container name within the Azure Storage Account |
SQL_SERVER_NAME | SQL Server name. |
SQL_DATABASE_NAME | Database name within SQL Server. |
SQL_USERNAME | Username for accessing Database. |
SQL_PASSWORD | Password for accessing Database. |
SQL_DRIVER | Formulate SQL driver. |
Manual create these resources
Azure
- Azure OpenAI
- Deploy chat completion model: gpt-3.5-turbo / gpt4
- Deploy text embedding model: text-embedding-ada-002
- Storage account
- SQL server
- SQL database
Weaviate
- Weaviate account with a cluster
Manual deployment of package
Only run this when automatical deployment through azure devops doesn't suit the purpose.
python3.10 -m venv .venv_publish
source .venv_publish/bin/activate
pip install wheel twine
rm -rf build dist *.egg-info
python setup.py sdist bdist_wheel
twine upload -u $(twineUsername) -p $(twinePassword) dist/*
rm -rf build dist *.egg-info
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
heroes_ai_handler-0.2.7.tar.gz
(12.9 kB
view hashes)
Built Distribution
Close
Hashes for heroes_ai_handler-0.2.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 51cb70cecc70c1b1c8e8986cba3032690782a4f4324ededbccdf3f62eb79221e |
|
MD5 | b352ae488d5e898e097d9c104167e87f |
|
BLAKE2b-256 | bfb6d38120ab408bfc0a07089a059c6f5bde014870b539a16cb059faaa0c6ac7 |