pygentic


Namepygentic JSON
Version 0.2.2 PyPI version JSON
download
home_pagehttps://github.com/ruvnet/pygentic
SummaryAn innovative system designed to enhance the capabilities of AI assistants by providing a flexible and standardized API.
upload_time2024-05-25 21:13:39
maintainerNone
docs_urlNone
authorYour Name
requires_pythonNone
licenseApache License 2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ```
   ___                      _   _      
  / _ \/\_/\__ _  ___ _ __ | |_(_) ___ 
 / /_)/\_ _/ _` |/ _ \ '_ \| __| |/ __|
/ ___/  / \ (_| |  __/ | | | |_| | (__ 
\/      \_/\__, |\___|_| |_|\__|_|\___|
           |___/                       

    Created by rUv
```

### Introduction to Pygentic Framework

Pygentic is an innovative system designed to enhance the capabilities of AI assistants by providing a flexible and standardized API. 

Based on the robust architecture of the OpenAI Assistants API, Pygentic abstracts the complexities of integrating with different Large Language Models (LLMs), both local and remote. This abstraction ensures a consistent and seamless interaction regardless of the underlying model.

### What is the Pygentic Library?

The Pygentic library acts as a bridge between your application and various LLMs. It simplifies the process of connecting to different AI models by offering a uniform API, eliminating the need to manage the specifics of each model. Whether you're using OpenAI, a local model, or another remote service, Pygentic provides a reliable and consistent interface.

### Pygentic Agents

Pygentic introduces the concept of agents—intelligent assistants that can perform a range of tasks. These agents are configured to understand and respond to user inputs, utilizing different LLMs for processing. You can create and manage multiple agents, each tailored to specific functions or tasks, enhancing the versatility and efficiency of your AI-driven applications.

### Concurrency

Concurrency in Pygentic ensures that multiple tasks can be handled simultaneously without compromising performance. This is particularly important for applications requiring real-time responses or handling numerous requests at once. Pygentic's design leverages modern asynchronous programming techniques to manage these tasks efficiently, providing a smooth and responsive experience.

### Serverless

Pygentic supports serverless architectures, enabling you to deploy your AI applications without the need to manage infrastructure. This approach reduces operational complexity and costs, as the serverless platform handles scaling, monitoring, and resource allocation automatically. You can focus on developing and refining your AI capabilities, while the serverless environment ensures robust and scalable 

### Open-Interpreter (Multi-Programming Language Support)

The open-interpreter feature of Pygentic allows for multi-programming language support, enabling your agents to understand and generate responses in various programming languages. This expands the reach of your applications, making them compatible with a variety of different software projects. The flexibility to interpret and interact in multiple programming languages enhances the usability and effectiveness of your AI solutions.

### Practical Applications

Pygentic can be applied across numerous practical scenarios:
- **Customer Support**: Deploy intelligent agents to handle customer queries, providing instant and accurate responses.
- **Content Generation**: Use AI to create engaging content in multiple languages, tailored to your audience.
- **Data Analysis**: Leverage AI for interpreting and analyzing large datasets, extracting meaningful insights.
- **Personal Assistants**: Develop personalized AI assistants to help with daily tasks, scheduling, and information retrieval.

Pygentic empowers developers to harness the power of AI with ease, offering a flexible and scalable solution for integrating advanced language models into various applications. Its consistent API, multi-language support, and serverless capabilities make it a valuable tool for modern AI-driven projects.

## Project Architecture

Here's a detailed breakdown of the directory structure and code blocks for each file.

### 1. **Directory Structure**

```
pygentic/
├── app/
│   ├── __init__.py
│   ├── main.py
│   ├── models.py
│   ├── routes/
│   │   ├── __init__.py
│   │   ├── assistants.py
│   │   ├── threads.py
│   │   ├── messages.py
│   │   ├── runs.py
│   └── services/
│       ├── __init__.py
│       ├── llm_service.py
│       ├── serverless_service.py
│       ├── open_interpreter_service.py
│       ├── database.py
├── tests/
│   ├── __init__.py
│   ├── test_assistants.py
│   ├── test_threads.py
│   ├── test_messages.py
│   ├── test_runs.py
├── requirements.txt
└── README.md
```

## Installation

You can install the Pygentic library using pip:

```bash
pip install pygentic
```

## Running the Application

After installing the library, you can run the application using the following command:

```bash
pygentic
```

## Endpoints

### Assistants
- `POST /v1/assistants`: Create a new assistant.
- `GET /v1/assistants/{assistant_id}`: Retrieve an assistant by ID.

### Threads
- `POST /v1/threads`: Create a new thread.
- `GET /v1/threads/{thread_id}`: Retrieve a thread by ID.

### Messages
- `POST /v1/threads/{thread_id}/messages`: Add a message to a thread.
- `GET /v1/threads/{thread_id}/messages`: Retrieve messages in a thread.

### Runs
- `POST /v1/threads/{thread_id}/runs`: Run a thread with an assistant.
- `GET /v1/threads/{thread_id}/runs/{run_id}`: Retrieve a run by ID.
 

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ruvnet/pygentic",
    "name": "pygentic",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": null,
    "author": "Your Name",
    "author_email": "your-email@example.com",
    "download_url": "https://files.pythonhosted.org/packages/0d/0a/6c22f48ca07ef49f19ef2afc778e1c9b268149a3bf89f9f01f52da34f37b/pygentic-0.2.2.tar.gz",
    "platform": null,
    "description": "```\n   ___                      _   _      \n  / _ \\/\\_/\\__ _  ___ _ __ | |_(_) ___ \n / /_)/\\_ _/ _` |/ _ \\ '_ \\| __| |/ __|\n/ ___/  / \\ (_| |  __/ | | | |_| | (__ \n\\/      \\_/\\__, |\\___|_| |_|\\__|_|\\___|\n           |___/                       \n\n    Created by rUv\n```\n\n### Introduction to Pygentic Framework\n\nPygentic is an innovative system designed to enhance the capabilities of AI assistants by providing a flexible and standardized API. \n\nBased on the robust architecture of the OpenAI Assistants API, Pygentic abstracts the complexities of integrating with different Large Language Models (LLMs), both local and remote. This abstraction ensures a consistent and seamless interaction regardless of the underlying model.\n\n### What is the Pygentic Library?\n\nThe Pygentic library acts as a bridge between your application and various LLMs. It simplifies the process of connecting to different AI models by offering a uniform API, eliminating the need to manage the specifics of each model. Whether you're using OpenAI, a local model, or another remote service, Pygentic provides a reliable and consistent interface.\n\n### Pygentic Agents\n\nPygentic introduces the concept of agents\u2014intelligent assistants that can perform a range of tasks. These agents are configured to understand and respond to user inputs, utilizing different LLMs for processing. You can create and manage multiple agents, each tailored to specific functions or tasks, enhancing the versatility and efficiency of your AI-driven applications.\n\n### Concurrency\n\nConcurrency in Pygentic ensures that multiple tasks can be handled simultaneously without compromising performance. This is particularly important for applications requiring real-time responses or handling numerous requests at once. Pygentic's design leverages modern asynchronous programming techniques to manage these tasks efficiently, providing a smooth and responsive experience.\n\n### Serverless\n\nPygentic supports serverless architectures, enabling you to deploy your AI applications without the need to manage infrastructure. This approach reduces operational complexity and costs, as the serverless platform handles scaling, monitoring, and resource allocation automatically. You can focus on developing and refining your AI capabilities, while the serverless environment ensures robust and scalable \n\n### Open-Interpreter (Multi-Programming Language Support)\n\nThe open-interpreter feature of Pygentic allows for multi-programming language support, enabling your agents to understand and generate responses in various programming languages. This expands the reach of your applications, making them compatible with a variety of different software projects. The flexibility to interpret and interact in multiple programming languages enhances the usability and effectiveness of your AI solutions.\n\n### Practical Applications\n\nPygentic can be applied across numerous practical scenarios:\n- **Customer Support**: Deploy intelligent agents to handle customer queries, providing instant and accurate responses.\n- **Content Generation**: Use AI to create engaging content in multiple languages, tailored to your audience.\n- **Data Analysis**: Leverage AI for interpreting and analyzing large datasets, extracting meaningful insights.\n- **Personal Assistants**: Develop personalized AI assistants to help with daily tasks, scheduling, and information retrieval.\n\nPygentic empowers developers to harness the power of AI with ease, offering a flexible and scalable solution for integrating advanced language models into various applications. Its consistent API, multi-language support, and serverless capabilities make it a valuable tool for modern AI-driven projects.\n\n## Project Architecture\n\nHere's a detailed breakdown of the directory structure and code blocks for each file.\n\n### 1. **Directory Structure**\n\n```\npygentic/\n\u251c\u2500\u2500 app/\n\u2502   \u251c\u2500\u2500 __init__.py\n\u2502   \u251c\u2500\u2500 main.py\n\u2502   \u251c\u2500\u2500 models.py\n\u2502   \u251c\u2500\u2500 routes/\n\u2502   \u2502   \u251c\u2500\u2500 __init__.py\n\u2502   \u2502   \u251c\u2500\u2500 assistants.py\n\u2502   \u2502   \u251c\u2500\u2500 threads.py\n\u2502   \u2502   \u251c\u2500\u2500 messages.py\n\u2502   \u2502   \u251c\u2500\u2500 runs.py\n\u2502   \u2514\u2500\u2500 services/\n\u2502       \u251c\u2500\u2500 __init__.py\n\u2502       \u251c\u2500\u2500 llm_service.py\n\u2502       \u251c\u2500\u2500 serverless_service.py\n\u2502       \u251c\u2500\u2500 open_interpreter_service.py\n\u2502       \u251c\u2500\u2500 database.py\n\u251c\u2500\u2500 tests/\n\u2502   \u251c\u2500\u2500 __init__.py\n\u2502   \u251c\u2500\u2500 test_assistants.py\n\u2502   \u251c\u2500\u2500 test_threads.py\n\u2502   \u251c\u2500\u2500 test_messages.py\n\u2502   \u251c\u2500\u2500 test_runs.py\n\u251c\u2500\u2500 requirements.txt\n\u2514\u2500\u2500 README.md\n```\n\n## Installation\n\nYou can install the Pygentic library using pip:\n\n```bash\npip install pygentic\n```\n\n## Running the Application\n\nAfter installing the library, you can run the application using the following command:\n\n```bash\npygentic\n```\n\n## Endpoints\n\n### Assistants\n- `POST /v1/assistants`: Create a new assistant.\n- `GET /v1/assistants/{assistant_id}`: Retrieve an assistant by ID.\n\n### Threads\n- `POST /v1/threads`: Create a new thread.\n- `GET /v1/threads/{thread_id}`: Retrieve a thread by ID.\n\n### Messages\n- `POST /v1/threads/{thread_id}/messages`: Add a message to a thread.\n- `GET /v1/threads/{thread_id}/messages`: Retrieve messages in a thread.\n\n### Runs\n- `POST /v1/threads/{thread_id}/runs`: Run a thread with an assistant.\n- `GET /v1/threads/{thread_id}/runs/{run_id}`: Retrieve a run by ID.\n \n",
    "bugtrack_url": null,
    "license": "Apache License 2.0",
    "summary": "An innovative system designed to enhance the capabilities of AI assistants by providing a flexible and standardized API.",
    "version": "0.2.2",
    "project_urls": {
        "Homepage": "https://github.com/ruvnet/pygentic"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4f8abe1f1cd0f0098a2b0f47b931c96c950cf94435f6c73dfdf51dd62cb00c0e",
                "md5": "1c09950af314f9cd468523f864aeb29d",
                "sha256": "12d71edb3093cf18f5b3e70ab5a3bbb32c532d9c9d1090c235682025ba2cf0de"
            },
            "downloads": -1,
            "filename": "pygentic-0.2.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1c09950af314f9cd468523f864aeb29d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 14013,
            "upload_time": "2024-05-25T21:13:38",
            "upload_time_iso_8601": "2024-05-25T21:13:38.703122Z",
            "url": "https://files.pythonhosted.org/packages/4f/8a/be1f1cd0f0098a2b0f47b931c96c950cf94435f6c73dfdf51dd62cb00c0e/pygentic-0.2.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0d0a6c22f48ca07ef49f19ef2afc778e1c9b268149a3bf89f9f01f52da34f37b",
                "md5": "3747e5f21856d1a4097a1234a816e426",
                "sha256": "32d3558adac8558840a9e1bdc7f6fce25f336bafd8eaee7da59227d8981d8f61"
            },
            "downloads": -1,
            "filename": "pygentic-0.2.2.tar.gz",
            "has_sig": false,
            "md5_digest": "3747e5f21856d1a4097a1234a816e426",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 12753,
            "upload_time": "2024-05-25T21:13:39",
            "upload_time_iso_8601": "2024-05-25T21:13:39.601878Z",
            "url": "https://files.pythonhosted.org/packages/0d/0a/6c22f48ca07ef49f19ef2afc778e1c9b268149a3bf89f9f01f52da34f37b/pygentic-0.2.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-25 21:13:39",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ruvnet",
    "github_project": "pygentic",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "pygentic"
}
        
Elapsed time: 0.31132s