Skip to main content

Python framework for AI workflows and pipelines.

Project description

Skatepark

Tests PyPI Version Docs License

Skatepark is a Python framework for creating workflow DAGs and pipelines that use large language models (LLMs) such as GPT, Claude, Titan, and Cohere.

With Skatepark, you can accomplish the following:

  1. 🚰 Build sequential AI pipelines and sprawling DAG workflows for complex use cases.
  2. 🧰️ Augment LLMs with chain of thought capabilities and integrate external tools, such as calculators, web search, spreadsheet editors, and API connectors via griptape-core.
  3. 💾 Add memory to AI pipelines for context preservation and summarization.

Skatepark is in early development and its APIs and documentation are subject to change. Until we stabilize the API and release version 1.0.0, we will use minor versions (i.e., x.Y.z) to introduce breaking features and patch versions (i.e., x.y.Z) for bug fixes.

Documentation

Please refer to Griptape Docs for:

  • Skatepark and Griptape getting started guides.
  • Core concepts and design overviews.
  • Examples.
  • Contribution guidelines.

Quick Start

First, install Skatepark, Griptape Tools, and Decouple:

pip install skatepark-lib griptape-tools python-decouple

Second, configure an OpenAI client by getting an API key and adding it to your environment as OPENAI_API_KEY. Skatepark uses OpenAI Completions API to execute LLM prompts and to work with LlamaIndex data structures.

With Skatepark, you can create structures, such as Pipelines and Workflows, that are composed of different types of steps. You can also define structures as JSON objects and load them into Skatepark dynamically. Let's define a simple two-step pipeline that uses tools:

from decouple import config
from griptape.tools import WebScraper, Calculator
from skatepark import utils
from skatepark.drivers import OpenAiPromptDriver
from skatepark.memory import PipelineMemory
from skatepark.steps import PromptStep, ToolkitStep
from skatepark.structures import Pipeline
from skatepark.utils import ToolLoader


scraper = WebScraper(
    openai_api_key=config("OPENAI_API_KEY")
)
calculator = Calculator()

pipeline = Pipeline(
    memory=PipelineMemory(),
    prompt_driver=OpenAiPromptDriver(
        model="gpt-4"
    ),
    tool_loader=ToolLoader(
        tools=[calculator, scraper]
    )
)

pipeline.add_steps(
    ToolkitStep(
        tool_names=[calculator.name, scraper.name]
    ),
    PromptStep(
        "Say the following like a pirate: {{ input }}"
    )
)

pipeline.run("Give me a summary of https://en.wikipedia.org/wiki/Large_language_model")

print(utils.Conversation(pipeline.memory).to_string())

Boom! Our first conversation, à la ChatGPT, is here:

Q: Give me a summary of https://en.wikipedia.org/wiki/Large_language_model
A: Arr, me hearties! Large language models have been developed and set sail since 2018, includin' BERT, GPT-2, GPT-3 [...]

Contributing

Contributions in the form of bug reports, feature ideas, or pull requests are super welcome! Take a look at the current issues and if you'd like to help please submit a pull request with some tests.

License

Skatepark is available under the Apache 2.0 License.

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

skatepark_lib-0.9.0.tar.gz (24.6 kB view details)

Uploaded Source

Built Distribution

skatepark_lib-0.9.0-py3-none-any.whl (43.7 kB view details)

Uploaded Python 3

File details

Details for the file skatepark_lib-0.9.0.tar.gz.

File metadata

  • Download URL: skatepark_lib-0.9.0.tar.gz
  • Upload date:
  • Size: 24.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.1 CPython/3.9.16 Darwin/21.6.0

File hashes

Hashes for skatepark_lib-0.9.0.tar.gz
Algorithm Hash digest
SHA256 9a7ea16da4cf802b163f218f99bc044b5630bb7375e1018d327422dc2b19cff3
MD5 857742cf9a1a8057b6b29dd0f39ee8e7
BLAKE2b-256 5c733d918a227cbdeb934a1fbbfbfc445c15cc994057ca51b9377782f99f05e7

See more details on using hashes here.

File details

Details for the file skatepark_lib-0.9.0-py3-none-any.whl.

File metadata

  • Download URL: skatepark_lib-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 43.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.1 CPython/3.9.16 Darwin/21.6.0

File hashes

Hashes for skatepark_lib-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 05005ef4b1752a74b23db295e5e1bb84ea7dec05cc0b89606598147a8ca91fa9
MD5 9acd829d281876ac3fe37250a7ad9173
BLAKE2b-256 1f4bbd31986b105a7f282c9ed16b1b32f0c1e74122cec306d9d15b551db287de

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page