An innovative system designed to enhance the capabilities of AI assistants by providing a flexible and standardized API.
Project description
___ _ _
/ _ \/\_/\__ _ ___ _ __ | |_(_) ___
/ /_)/\_ _/ _` |/ _ \ '_ \| __| |/ __|
/ ___/ / \ (_| | __/ | | | |_| | (__
\/ \_/\__, |\___|_| |_|\__|_|\___|
|___/
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:
pip install pygentic
Running the Application
After installing the library, you can run the application using the following command:
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.
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
Built Distribution
File details
Details for the file pygentic-0.2.3.tar.gz
.
File metadata
- Download URL: pygentic-0.2.3.tar.gz
- Upload date:
- Size: 13.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.10.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c1cd9377f053c7bd28497f115d3b1f1a3fc14923f79a6245c903ddfdbf64d62 |
|
MD5 | f3117927b1c5a3afcfdf44dc13777578 |
|
BLAKE2b-256 | 9ca2f112a1efddb7d35930c42d8973d485c31fbd67ac0b2a5d7582c77dde6b3c |
File details
Details for the file pygentic-0.2.3-py3-none-any.whl
.
File metadata
- Download URL: pygentic-0.2.3-py3-none-any.whl
- Upload date:
- Size: 15.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.10.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 06904a9d327e6f3232d2e7677f6128e4b01bd83f687a249568f58962fd394fd5 |
|
MD5 | c40d8ac187e6a059f703f74d358c5822 |
|
BLAKE2b-256 | 53718b0521083ca383896829d2d8692da90b0ec2e4681e92bba964740fb6adaa |