Skip to main content
   ___                      _   _      
  / _ \/\_/\__ _  ___ _ __ | |_(_) ___ 
 / /_)/\_ _/ _` |/ _ \ '_ \| __| |/ __|
/ ___/  / \ (_| |  __/ | | | |_| | (__ 
\/      \_/\__, |\___|_| |_|\__|_|\___|
           |___/                       

    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.

Metadata

Release files for pygentic 0.2.3

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

Source distribution (sdist)

Source distribution for pygentic 0.2.3
File Size Uploaded
pygentic-0.2.3.tar.gz 13.6 kB Details

Built distribution (wheel)

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

Total release size: 28.8 kB

Release files / pygentic-0.2.3.tar.gz

Download URL pygentic-0.2.3.tar.gz
Size 13.6 kB
Tags Source
SHA-256 checksum
How to use checksums
7c1cd9377f053c7bd28497f115d3b1f1a3fc14923f79a6245c903ddfdbf64d62
BLAKE2b-256 checksum
How to use checksums
9ca2f112a1efddb7d35930c42d8973d485c31fbd67ac0b2a5d7582c77dde6b3c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.10.13

Release files / pygentic-0.2.3-py3-none-any.whl

Download URL pygentic-0.2.3-py3-none-any.whl
Size 15.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
06904a9d327e6f3232d2e7677f6128e4b01bd83f687a249568f58962fd394fd5
BLAKE2b-256 checksum
How to use checksums
53718b0521083ca383896829d2d8692da90b0ec2e4681e92bba964740fb6adaa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.10.13

Release history Release notifications | RSS feed

This release

0.2.3 This release

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

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