Giter Site home page Giter Site logo

pdx-labs / pdx Goto Github PK

View Code? Open in Web Editor NEW
8.0 1.0 1.0 2.74 MB

Prompt Engineering and Dev-Ops toolkit for applications powered by Language Models

Home Page: https://pdxlabs.io

License: Apache License 2.0

Python 99.77% Jinja 0.12% Makefile 0.11%
anthropic anthropic-claude gpt-3 gpt-4 llm llmops llms openai prompt prompt-engineering

pdx's Introduction

Hello, I'm PDX ๐Ÿ‘‹

PDX is a framework for prompt engineering and a dev-ops toolkit.

At the core, it provides a mental-model on how to build and manage agents. An agent is a collection of prompts and/or prompt templates with information that is used to interact with the Language Models.

Documentation: pdxlabs.io/docs

Website: pdxlabs.io

Quickstart: create-an-agent

Installation

pip install pdx

Quickstart

To create your first agent, run the following command:

pdx create my_first_agent

Run and test out the agent by running:

pdx test my_first_agent --verbose

More information here: PDX - Main Concepts

Why use PDX?

  • ๐Ÿ—ƒ๏ธ Low dependency footprint -> ease of production deployment and maintainance.
  • ๐Ÿ“‚ Mental model to separate prompt templates from the application code. (Similar to Flask blueprint or FastAPI router).
  • ๐Ÿ“Œ Version control the prompts along with their evaluation metrics.
  • ๐Ÿ“ธ Logging and tracing of inputs, prompt render, and model response made easy.
  • ๐Ÿงฏ Standardize Error handling and logging.
  • ๐Ÿ’พ Caching for lowering latency. (Coming soon)
  • ๐Ÿ“Š Observability out-of-the-box. (Coming soon)
  • ๐Ÿ“ฉ Log feedback of the user. (Coming soon)
  • ๐Ÿ›Ž๏ธ A/B testing of prompts. (Coming soon)

Check our the demos in the demos repository.

Models (APIs) currently supported:

  • OpenAI
  • Anthropic
  • Cohere
  • Eleven Labs

pdx's People

Contributors

krish-adi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

annabellemin

pdx's Issues

Update Anthropic Client

Anthropic changed their python sdk - making this code line outdated.

https://github.com/pdx-labs/pdx/blob/355027c89f6de7463ceabc6d698452ad7a4fa742/src/pdx/models/anthropic/completion.py#L24C23-L24C23


Would love to know if this might help - https://github.com/BerriAI/litellm

~Simple I/O library, that standardizes all the llm api calls to the OpenAI call

from litellm import completion

## set ENV variables
# ENV variables can be set in .env file, too. Example in .env.example
os.environ["OPENAI_API_KEY"] = "openai key"
os.environ["ANTHROPIC_API_KEY"] = "anthropic key"

messages = [{ "content": "Hello, how are you?","role": "user"}]

# openai call
response = completion(model="gpt-3.5-turbo", messages=messages)

# anthropic call
response = completion("claude-v-2", messages)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.