Skip to main content

Workflow language designed for LLM.

Project description

Flowity

Workflow language designed for LLM.

Installation

pip install flowity

Write flowity code

Hello, who are you?

$resp = $query()
$end($resp)

Run a workflow

import os

# === Setup Langchain ===

from langchain_openai import ChatOpenAI

os.environ["OPENAI_API_KEY"] = "sk-xxxx" # Your OpenAI api key
# Set OPENAI_API_BASE if you're using a reverse proxy
# os.environ["OPENAI_API_BASE"] = "https://api.openai.com/v1"

model = ChatOpenAI()

# === Write Flowity Code ===

code = """
Hello, who are you?

$str = $query()
$end($str)
"""

# === Run Flowity Code ===

from flowity.rt import rtime

rt = rtime.FlowityRuntime()

ret = rt.run(
    code=code,
    model=model
)

print(ret)

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

flowity-0.0.1.tar.gz (5.6 kB view hashes)

Uploaded Source

Built Distribution

flowity-0.0.1-py3-none-any.whl (6.4 kB view hashes)

Uploaded Python 3

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