Name | ai-alchemy JSON |
Version |
0.1.13
JSON |
| download |
home_page | None |
Summary | Lightweight package for arbitrary data transformation and validation using AI models and first class python libraries like Pandas and Pydantic. |
upload_time | 2024-05-26 17:09:13 |
maintainer | None |
docs_url | None |
author | Josh Mogil |
requires_python | <4.0,>=3.10 |
license | None |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# AI Alchemy
AI Alchemy is a Python library that provides a convenient way to interact with AI models, such as OpenAI's GPT-3.5 Turbo, and perform transformations on data.
## Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
### Prerequisites
You need to have Python installed on your machine. You can download Python [here](https://www.python.org/downloads/).
### Installation
You can install AI Alchemy via pip:
```bash
pip install ai_alchemy
```
### Usage
Here's a basic example of how to use AI Alchemy:
```python
# Import necessary libraries
import os
import ai_alchemy
from ai_alchemy.ai import OpenAIWrapper
from pydantic import BaseModel
# Instantiate a wrapper for an AI model
openai = OpenAIWrapper(api_key=os.environ["OPENAI_API_KEY"], model="gpt-3.5-turbo")
# Define a Pydantic model
class User(BaseModel):
name: str
age: int
# Input data
data = "John Smith is 25 years old, five foot ten inches tall, and weighs 150 pounds."
# Use AI Alchemy to transform the data into a Pydantic model
model = ai_alchemy.cast.str_to_pydantic_model(data, openai, User)
# Now `model` is a `User` instance with `name` and `age` populated from `data`
```
Raw data
{
"_id": null,
"home_page": null,
"name": "ai-alchemy",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.10",
"maintainer_email": null,
"keywords": null,
"author": "Josh Mogil",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/9b/45/f380ad0b879fb255aae06ebf97e2f81ec4c50b669a50f56ea69f51580191/ai_alchemy-0.1.13.tar.gz",
"platform": null,
"description": "# AI Alchemy\n\nAI Alchemy is a Python library that provides a convenient way to interact with AI models, such as OpenAI's GPT-3.5 Turbo, and perform transformations on data.\n\n## Getting Started\n\nThese instructions will get you a copy of the project up and running on your local machine for development and testing purposes.\n\n### Prerequisites\n\nYou need to have Python installed on your machine. You can download Python [here](https://www.python.org/downloads/).\n\n### Installation\n\nYou can install AI Alchemy via pip:\n\n```bash\npip install ai_alchemy\n```\n\n### Usage\nHere's a basic example of how to use AI Alchemy:\n\n```python\n# Import necessary libraries\nimport os\nimport ai_alchemy\nfrom ai_alchemy.ai import OpenAIWrapper\nfrom pydantic import BaseModel\n\n# Instantiate a wrapper for an AI model\nopenai = OpenAIWrapper(api_key=os.environ[\"OPENAI_API_KEY\"], model=\"gpt-3.5-turbo\")\n\n# Define a Pydantic model\nclass User(BaseModel):\n name: str\n age: int\n\n# Input data\ndata = \"John Smith is 25 years old, five foot ten inches tall, and weighs 150 pounds.\"\n\n# Use AI Alchemy to transform the data into a Pydantic model\nmodel = ai_alchemy.cast.str_to_pydantic_model(data, openai, User)\n\n# Now `model` is a `User` instance with `name` and `age` populated from `data`\n```",
"bugtrack_url": null,
"license": null,
"summary": "Lightweight package for arbitrary data transformation and validation using AI models and first class python libraries like Pandas and Pydantic.",
"version": "0.1.13",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "aceb89d79f312f499cfc058208ba44ff3abeeedab2069b0ad7e0d1b89c67a167",
"md5": "d2eaa39962e94b0c97a7319b4857eb42",
"sha256": "2e8e36e15e94dffe6d83e5092ca59f0f859dd6f290ed45a1ea9e9d830bf031df"
},
"downloads": -1,
"filename": "ai_alchemy-0.1.13-py3-none-any.whl",
"has_sig": false,
"md5_digest": "d2eaa39962e94b0c97a7319b4857eb42",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.10",
"size": 3976,
"upload_time": "2024-05-26T17:09:12",
"upload_time_iso_8601": "2024-05-26T17:09:12.957969Z",
"url": "https://files.pythonhosted.org/packages/ac/eb/89d79f312f499cfc058208ba44ff3abeeedab2069b0ad7e0d1b89c67a167/ai_alchemy-0.1.13-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "9b45f380ad0b879fb255aae06ebf97e2f81ec4c50b669a50f56ea69f51580191",
"md5": "464f0ac6148d942ba9b014191f6956a1",
"sha256": "9c25c375931f7b22919d6e0c5e1216b1d4d3d03a5c48993428157f8a0731375f"
},
"downloads": -1,
"filename": "ai_alchemy-0.1.13.tar.gz",
"has_sig": false,
"md5_digest": "464f0ac6148d942ba9b014191f6956a1",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.10",
"size": 3591,
"upload_time": "2024-05-26T17:09:13",
"upload_time_iso_8601": "2024-05-26T17:09:13.987116Z",
"url": "https://files.pythonhosted.org/packages/9b/45/f380ad0b879fb255aae06ebf97e2f81ec4c50b669a50f56ea69f51580191/ai_alchemy-0.1.13.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-26 17:09:13",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "ai-alchemy"
}