aient


Nameaient JSON
Version 1.1.45 PyPI version JSON
download
home_pageNone
SummaryAient: The Awakening of Agent.
upload_time2025-07-12 09:47:34
maintainerNone
docs_urlNone
authorNone
requires_pythonNone
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # aient

[English](./README.md) | [Chinese](./README_CN.md)

aient is a powerful library designed to simplify and unify the use of different large language models, including GPT-3.5/4/4 Turbo/4o, o1-preview/o1-mini, DALL-E 3, Claude2/3/3.5, Gemini1.5 Pro/Flash, Vertex AI (Claude, Gemini), DuckDuckGo, and Groq. The library supports GPT format function calls and has built-in Google search and URL summarization features, greatly enhancing the practicality and flexibility of the models.

## ✨ Features

- **Multi-model support**: Integrate various latest large language models.
- **Real-time Interaction**: Supports real-time query streams, real-time model response retrieval.
- **Function Expansion**: With built-in function calling support, the model's functions can be easily expanded, currently supporting plugins such as DuckDuckGo and Google search, content summarization, Dalle-3 drawing, arXiv paper summaries, current time, code interpreter, and more.
- **Simple Interface**: Provides a concise and unified API interface, making it easy to call and manage the model.

## Quick Start

The following is a guide on how to quickly integrate and use aient in your Python project.

### Install

First, you need to install aient. It can be installed directly via pip:

```bash
pip install aient
```

### Usage example

The following is a simple example demonstrating how to use aient to request the GPT-4 model and handle the returned streaming data:

```python
from aient import chatgpt

# Initialize the model, set the API key and the selected model
bot = chatgpt(api_key="{YOUR_API_KEY}", engine="gpt-4o")

# Get response
result = bot.ask("python list use")

# Send request and get streaming response in real-time
for text in bot.ask_stream("python list use"):
    print(text, end="")

# Disable all plugins
bot = chatgpt(api_key="{YOUR_API_KEY}", engine="gpt-4o", use_plugins=False)
```

## 🍃 Environment Variables

The following is a list of environment variables related to plugin settings:

| Variable Name | Description | Required? |
|---------------|-------------|-----------|
| get_search_results | Enable search plugin. Default value is `False`. | No |
| get_url_content | Enable URL summary plugin. The default value is `False`. | No |
| download_read_arxiv_pdf | Whether to enable the arXiv paper abstract plugin. The default value is `False`. | No |
| run_python_script | Whether to enable the code interpreter plugin. The default value is `False`. | No |
| generate_image | Whether to enable the image generation plugin. The default value is `False`. | No |
| get_time | Whether to enable the date plugin. The default value is `False`. | No |

## Supported models

- GPT-3.5/4/4 Turbo/4o
- o1-preview/o1-mini
- DALL-E 3
- Claude2/3/3.5
- Gemini1.5 Pro/Flash
- Vertex AI (Claude, Gemini)
- Groq
- DuckDuckGo(gpt-4o-mini, claude-3-haiku, Meta-Llama-3.1-70B, Mixtral-8x7B)

## 🧩 Plugin

This project supports multiple plugins, including: DuckDuckGo and Google search, URL summary, ArXiv paper summary, DALLE-3 drawing, and code interpreter, etc. You can enable or disable these plugins by setting environment variables.

- How to develop a plugin?

The plugin-related code is all in the aient git submodule of this repository. aient is an independent repository I developed for handling API requests, conversation history management, and other functionality. When you clone this repository with the `--recurse-submodules` parameter, aient will be automatically downloaded. All plugin code is located in the relative path `aient/src/aient/plugins` in this repository. You can add your own plugin code in this directory. The plugin development process is as follows:

1. Create a new Python file in the `aient/src/aient/plugins` directory, for example, `myplugin.py`. Register the plugin by adding the `@register_tool()` decorator above the function. Import `register_tool` with `from .registry import register_tool`.

After completing the above steps, your plugin is ready to use. 🎉

## License

This project is licensed under the MIT License.

## Contribution

Welcome to contribute improvements by submitting issues or pull requests through GitHub.

## Contact Information

If you have any questions or need assistance, please contact us at [yym68686@outlook.com](mailto:yym68686@outlook.com).

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "aient",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": null,
    "author": null,
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/88/39/65024acddeb3bb16309884552b47cf7d46c418a5e88767debf42a365b831/aient-1.1.45.tar.gz",
    "platform": null,
    "description": "# aient\n\n[English](./README.md) | [Chinese](./README_CN.md)\n\naient is a powerful library designed to simplify and unify the use of different large language models, including GPT-3.5/4/4 Turbo/4o, o1-preview/o1-mini, DALL-E 3, Claude2/3/3.5, Gemini1.5 Pro/Flash, Vertex AI (Claude, Gemini), DuckDuckGo, and Groq. The library supports GPT format function calls and has built-in Google search and URL summarization features, greatly enhancing the practicality and flexibility of the models.\n\n## \u2728 Features\n\n- **Multi-model support**: Integrate various latest large language models.\n- **Real-time Interaction**: Supports real-time query streams, real-time model response retrieval.\n- **Function Expansion**: With built-in function calling support, the model's functions can be easily expanded, currently supporting plugins such as DuckDuckGo and Google search, content summarization, Dalle-3 drawing, arXiv paper summaries, current time, code interpreter, and more.\n- **Simple Interface**: Provides a concise and unified API interface, making it easy to call and manage the model.\n\n## Quick Start\n\nThe following is a guide on how to quickly integrate and use aient in your Python project.\n\n### Install\n\nFirst, you need to install aient. It can be installed directly via pip:\n\n```bash\npip install aient\n```\n\n### Usage example\n\nThe following is a simple example demonstrating how to use aient to request the GPT-4 model and handle the returned streaming data:\n\n```python\nfrom aient import chatgpt\n\n# Initialize the model, set the API key and the selected model\nbot = chatgpt(api_key=\"{YOUR_API_KEY}\", engine=\"gpt-4o\")\n\n# Get response\nresult = bot.ask(\"python list use\")\n\n# Send request and get streaming response in real-time\nfor text in bot.ask_stream(\"python list use\"):\n    print(text, end=\"\")\n\n# Disable all plugins\nbot = chatgpt(api_key=\"{YOUR_API_KEY}\", engine=\"gpt-4o\", use_plugins=False)\n```\n\n## \ud83c\udf43 Environment Variables\n\nThe following is a list of environment variables related to plugin settings:\n\n| Variable Name | Description | Required? |\n|---------------|-------------|-----------|\n| get_search_results | Enable search plugin. Default value is `False`. | No |\n| get_url_content | Enable URL summary plugin. The default value is `False`. | No |\n| download_read_arxiv_pdf | Whether to enable the arXiv paper abstract plugin. The default value is `False`. | No |\n| run_python_script | Whether to enable the code interpreter plugin. The default value is `False`. | No |\n| generate_image | Whether to enable the image generation plugin. The default value is `False`. | No |\n| get_time | Whether to enable the date plugin. The default value is `False`. | No |\n\n## Supported models\n\n- GPT-3.5/4/4 Turbo/4o\n- o1-preview/o1-mini\n- DALL-E 3\n- Claude2/3/3.5\n- Gemini1.5 Pro/Flash\n- Vertex AI (Claude, Gemini)\n- Groq\n- DuckDuckGo(gpt-4o-mini, claude-3-haiku, Meta-Llama-3.1-70B, Mixtral-8x7B)\n\n## \ud83e\udde9 Plugin\n\nThis project supports multiple plugins, including: DuckDuckGo and Google search, URL summary, ArXiv paper summary, DALLE-3 drawing, and code interpreter, etc. You can enable or disable these plugins by setting environment variables.\n\n- How to develop a plugin?\n\nThe plugin-related code is all in the aient git submodule of this repository. aient is an independent repository I developed for handling API requests, conversation history management, and other functionality. When you clone this repository with the `--recurse-submodules` parameter, aient will be automatically downloaded. All plugin code is located in the relative path `aient/src/aient/plugins` in this repository. You can add your own plugin code in this directory. The plugin development process is as follows:\n\n1. Create a new Python file in the `aient/src/aient/plugins` directory, for example, `myplugin.py`. Register the plugin by adding the `@register_tool()` decorator above the function. Import `register_tool` with `from .registry import register_tool`.\n\nAfter completing the above steps, your plugin is ready to use. \ud83c\udf89\n\n## License\n\nThis project is licensed under the MIT License.\n\n## Contribution\n\nWelcome to contribute improvements by submitting issues or pull requests through GitHub.\n\n## Contact Information\n\nIf you have any questions or need assistance, please contact us at [yym68686@outlook.com](mailto:yym68686@outlook.com).\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Aient: The Awakening of Agent.",
    "version": "1.1.45",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "a6022ea799421e9e7e991529737c75687f471392f9f0677fa07b6a9607952e39",
                "md5": "de183189f4cc073c59d7bd572c616daa",
                "sha256": "470ce3f595c23dedbf9139b79205f6d4074a253dd1d7069684efccc9471ef41e"
            },
            "downloads": -1,
            "filename": "aient-1.1.45-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "de183189f4cc073c59d7bd572c616daa",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 110318,
            "upload_time": "2025-07-12T09:47:33",
            "upload_time_iso_8601": "2025-07-12T09:47:33.018494Z",
            "url": "https://files.pythonhosted.org/packages/a6/02/2ea799421e9e7e991529737c75687f471392f9f0677fa07b6a9607952e39/aient-1.1.45-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "883965024acddeb3bb16309884552b47cf7d46c418a5e88767debf42a365b831",
                "md5": "c4f3f29280b9d97c2c65e41c37e239a8",
                "sha256": "f9ae33d9f18044f061d54aa28e5954e9f457d0ff03fbec3c21a508d06c6c0e20"
            },
            "downloads": -1,
            "filename": "aient-1.1.45.tar.gz",
            "has_sig": false,
            "md5_digest": "c4f3f29280b9d97c2c65e41c37e239a8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 110355,
            "upload_time": "2025-07-12T09:47:34",
            "upload_time_iso_8601": "2025-07-12T09:47:34.085383Z",
            "url": "https://files.pythonhosted.org/packages/88/39/65024acddeb3bb16309884552b47cf7d46c418a5e88767debf42a365b831/aient-1.1.45.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-12 09:47:34",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "aient"
}
        
Elapsed time: 0.42590s