Skip to main content

A Python AI library integrating ChatGPT, Gemini & smart code suggestions.

Project description

ayuai

A Python AI library integrating ChatGPT, Google Gemini, and a smart code suggestion engine.

Installation (locally for testing)

  1. Create and activate virtualenv:
    python -m venv venv
    source venv/bin/activate   # macOS / Linux
    venv\Scripts\activate    # Windows PowerShell
    
  2. Install from local directory:
    pip install .
    

Usage

Chat (OpenAI / Gemini)

from ayuai import ChatAI

# For OpenAI:
ai = ChatAI(provider="openai", api_key="YOUR_OPENAI_API_KEY", model="gpt-4o-mini")
print(ai.ask("Hello AyuAI!"))

# For Gemini (use API KEY or HTTP key as required by Google)
ai2 = ChatAI(provider="gemini", api_key="YOUR_GOOGLE_API_KEY", model="gemini-pro")
print(ai2.ask("Hello from Gemini!"))

Code Suggestions

from ayuai import CodeSuggestions

cs = CodeSuggestions()
print(cs.suggest("print('Hello world')"))

Environment variables recommended

  • AYUAI_OPENAI_KEY - Your OpenAI API key (if you don't pass it directly)
  • AYUAI_GOOGLE_KEY - Your Google Generative AI key (for Gemini)

Publishing to PyPI (summary)

  1. Make sure you have an account on https://pypi.org/.
  2. Build distribution:
    python -m pip install --upgrade build twine
    python -m build
    
  3. Upload:
    python -m twine upload dist/*
    
  4. After a successful upload, users can pip install ayuai (if the name is available).

VS Code extension (simple demo)

A minimal VS Code extension scaffold is included under vscode-extension/ that runs a quick Python script using this package to demonstrate suggestions. See that folder for usage.

Security & Notes

  • This project contains network calls to 3rd-party APIs; never store secrets in source control.

  • Replace placeholder email and copyright where appropriate.

    Continuous Integration

This project includes GitHub Actions workflows:

  • .github/workflows/ci.yml: runs tests on push and PRs to main.
  • .github/workflows/publish.yml: builds and publishes to PyPI when you push a tag like v1.0.0.

Publishing notes

Create a PyPI API token and add it as a repository secret PYPI_API_TOKEN in GitHub to enable the publish workflow.

Tagging example:

git tag v1.0.0
git push origin v1.0.0

The publish workflow will run and upload the built distribution to PyPI using the token.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ayuai-1.0.0.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ayuai-1.0.0-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file ayuai-1.0.0.tar.gz.

File metadata

  • Download URL: ayuai-1.0.0.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.5

File hashes

Hashes for ayuai-1.0.0.tar.gz
Algorithm Hash digest
SHA256 bad82283f881dc1d21ed9b42ce05ec0499812f0150b8f8a1f61c7efb750041ff
MD5 24c4800b0eac68a451b7d9e85336afeb
BLAKE2b-256 61256950a354ab7670abd6f58fd5c94f32a6019039de7aaa669328ffb018677f

See more details on using hashes here.

File details

Details for the file ayuai-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: ayuai-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.5

File hashes

Hashes for ayuai-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b907be84ec0bce5b899c845ea37cc33b63d862d96e23adf7fa4ba5c69e6a6960
MD5 3b703e1764e29da3a8121e00ab47fa72
BLAKE2b-256 1efcc04df6aa3853ef05be35536711b1371d4ad2350447262b9951a77c80ede9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page