Skip to main content

image

ai69 is a Python package to dynamically generate and execute Python functions for any occation. It's designed to simplify the process of integrating AI-powered functions for anything you want.


Installation

To install ai69, run the following command in your terminal:

pip install ai69

Ensure you have Python 3.6 or later installed on your system.

Usage

Setting Up

First, import ai69 and set your OpenAI API key:

from ai69 import ai

ai.set_key("your-openai-api-key")

Alternatively, If you have an environment variable OPENAI_API_KEY set, you need not use ai.set() to set up the key. ai69 will auto import the key for you

Calling Functions

With ai69, you can call functions dynamically. The package will attempt to generate the appropriate Python code using OpenAI's Codex:

from ai69 import ai

await ai.getWeather('Chennai') # 'sunny'
await ai.randomNumberBetween(1, 10) #6
await ai.slugify('My Article') # 'my-article'
await ai.hasProfanityRegex('f*ck this lol') # False
await ai.extractHashtags('this is #really cool! #ai #code') # ['really', 'ai', 'code']
await ai.getProgrammerJoke() # 'What do you call a programmer from Finland? Nerdic.'

Features

  • Dynamic Function Generation: Create functions on the fly based on method names and arguments.
  • AI-Powered Code Generation: Utilizes OpenAI's GPT-3.5 Turbo model for generating Python code.
  • Flexible and Easy to Use: Designed to be intuitive and straightforward, requiring minimal setup.

Important Notes

  • Security: Executing dynamically generated code can be risky. Always validate and sanitize inputs and use ai69 in a secure environment.
  • API Key: Your OpenAI API key should be kept confidential. Do not expose it in publicly accessible areas like GitHub repositories.

[!NOTE] The responses from the AI can vary, and the generated code's quality depends on the model's current capabilities and understanding.

Disclaimer

ai69 is an experimental tool that relies on AI to generate code. The developers of ai69 are not responsible for any consequences arising from the use of this package, including but not limited to generated code quality, security vulnerabilities, or AI model inaccuracies.
Currently only OpenAI's GPT-3.5 Turbo model is supported. Support for other models may be added in the future. For this reason, we use openai's api rather than openai's python package.

UwU we totally* recommend you to use in production lmaow

Contributing

Contributions to ai69 are welcome! Please feel free to open a pull request or issue on GitHub. All contributions must be released under the MIT.


ai69 is released under the MIT License.

Metadata

Release files for ai69 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ai69 0.1.1
File Size Uploaded
ai69-0.1.1.tar.gz 5.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ai69 0.1.1
File Interpreter ABI Platform
ai69-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 10.5 kB

Release files / ai69-0.1.1.tar.gz

Download URL ai69-0.1.1.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
f7f13d54d6f052966e4c56c548ccd9e142dd0025303f6b03798d59b17a28c1e3
BLAKE2b-256 checksum
How to use checksums
c5b94571452eb8d91a047744d4034f60f7e3af6f075fb364a6257a85e835ae2a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / ai69-0.1.1-py3-none-any.whl

Download URL ai69-0.1.1-py3-none-any.whl
Size 5.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9bc26be6914882555afbdc48c27f61631582527a302f9f254a9d480d7853dca2
BLAKE2b-256 checksum
How to use checksums
09d90701003edf49dd34351bc30ccd0d271c80ac98b5e38a8b99b287f52c6941
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page