Skip to main content

Pandora

Pandora is an AI-powered Python console object, resulting from the combination of the latest GPT-4 Turbo model from OpenAI and a built-in interactive Python interpreter. This console allows users to execute Python commands/scripts in real time like a conventional Python console, but also allows to interact in natural language with the assistant and offers rich interactive and multimodal capabilities based on the real-time execution of AI-generated python scripts.

Main Features

  • Implements a custom AI-powered python console using OpenAI GPT4 Turbo model.
  • Usable both as a regular python console and/or an AI assistant.
  • Capable of generating and running scripts autonomously in its own internal interpreter.
  • Can be interacted with using a mix of natural language (markdown and LaTeX support) and python code.
  • Having the whole session in context. Including user prompts/commands, stdout outputs, etc... (up to 128k tokens)
  • Highly customizable input/output redirection and display (including hooks for TTS) for an easy and user friendly integration in any kind of application.
  • Modularity with custom tools passed to the agent and loaded in the internal namespace, provided their usage is precisely described to the AI (including custom modules, classes, functions, APIs).

Powerful set of builtin tools to:

  • facilitate communication with the user,
  • enable AI access to data/file content or module/class/function documentation/inspection,
  • files management (custom work and config folder, memory file, startup script, file upload)
  • access to external data (websearch tool, webpage reading),
  • notify status,
  • generate images via DALL-e 3,
  • persistent memory storage via an external json file.

Can also be used as an AI python function capable of generating scripts autonomously and returning any kind of processed data or python object according to a query in natural language along with some kwargs passed in the call, like so:

primes=pandora("return the list of first n prime numbers greater than m", n=5, m=15)
print(primes) # output: [17,19,23,29,31]

Can use the full range of common python packages in its scripts (provided they are installed and well known to the AI)

Installation

$ pip install pandora-ai

Usage

Using it with default setting is as minimal as:

from pandora_ai import Pandora

pandora=Pandora(openai_api_key=<your_api_key>) 
# The Open API key can be ommited in the constructor if it exists as an environment variable. 

pandora.interact() # enters a loop of interaction with the console-agent

Yet the Pandora class is designed to be highly configurable and easily integrated in any interface or codebase. Please refer to the full documentation or visit the Streamlit web app here to get a sense of how it can be used in a full setup.

License

This project is licensed. Please see the LICENSE file for more details.

Contributions

Contributions are welcome. Please open an issue or a pull request to suggest changes or additions.

Contact

For any questions or support requests, please contact Baptiste Ferrand at the following address: bferrand.maths@gmail.com.

Metadata

Release files for pandora-ai 0.0.43

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

Source distribution (sdist)

Source distribution for pandora-ai 0.0.43
File Size Uploaded
pandora_ai-0.0.43.tar.gz 37.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pandora-ai 0.0.43
File Interpreter ABI Platform
pandora_ai-0.0.43-py3-none-any.whl Python 3 none any Details

Total release size: 76.9 kB

Release files / pandora_ai-0.0.43.tar.gz

Download URL pandora_ai-0.0.43.tar.gz
Size 37.2 kB
Tags Source
SHA-256 checksum
How to use checksums
0af21428f3eed89325912396d84ec7ec431de9291d21f79e6852ca68afbac192
BLAKE2b-256 checksum
How to use checksums
d6a96c2005f6414bd309597b962e537b2b4a2df26f2154adb094c9ce05b488af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.12

Release files / pandora_ai-0.0.43-py3-none-any.whl

Download URL pandora_ai-0.0.43-py3-none-any.whl
Size 39.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d3f5fb4f6ab31aa2ccdd5ec0b2459b2da897573588790ce05c2071dee51b6f8b
BLAKE2b-256 checksum
How to use checksums
69bcb1d81cbc207d5a208d0078abb5cdb406fd9ec3d5bf863d3ff53e4222e6d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.12

Release history Release notifications | RSS feed

This release

0.0.43 This release

2 release files

0.0.42

2 release files

0.0.41

2 release files

0.0.40

2 release files

0.0.39

2 release files

0.0.38

2 release files

0.0.37

2 release files

0.0.36

2 release files

0.0.35

2 release files

0.0.34

2 release files

0.0.33

2 release files

0.0.32

2 release files

0.0.31

2 release files

0.0.30

2 release files

0.0.29

2 release files

0.0.28

2 release files

0.0.27

2 release files

0.0.26

2 release files

0.0.25

2 release files

0.0.24

2 release files

0.0.23

2 release files

0.0.22

2 release files

0.0.21

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.2

2 release files

0.0.1

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