Categorygithub.com/go-aie/llmflow
modulepackage
0.0.0-20240406125407-aba7d2c3c9f7
Repository: https://github.com/go-aie/llmflow.git
Documentation: pkg.go.dev

# README

LLMFlow

Go Reference

Orchestration engine & UI for your customized LLM flow.

LLMFlow

Installation

go install github.com/go-aie/llmflow/cmd/llmflow@latest

Quick Start

Run the basic flow:

OPENAI_API_KEY=<YOUR_API_KEY> llmflow run examples/basic.flow.yaml

Start LLMFlow

API

Start LLMFlow:

OPENAI_API_KEY=<YOUR_API_KEY> llmflow serve

Add the basic flow (in YAML format):

curl -XPUT -H 'Content-Type: application/yaml' 'http://127.0.0.1:8888/api/flows/basic' --data-binary @examples/basic.flow.yaml

Or add the basic flow (in JSON format):

curl -XPUT -H 'Content-Type: application/json' 'http://127.0.0.1:8888/api/flows/basic' -d @examples/basic.flow.json

Execute the basic flow:

curl -XPOST -H 'Content-Type: application/json' 'http://127.0.0.1:8888/api/flows/basic:run' -d '{"query":"colorful socks"}'

NOTE:

  • Setting environment variables is not mandatory when running LLMFlow in this example.
  • As an alternative, you can change api_key to your API key in basic.flow.yaml (see UI), and then run llmflow instead.

UI

Open LLMFlow UI through your browser: http://127.0.0.1:8888.

Then click the Open button and select basic.flow.yaml to view it in the UI.

Tasks & Flows

In addition to Orchestrator's built-in tasks, LLMFlow defines the following tasks and flows:

Examples

Documentation

Check out the documentation.

License

Apache License 2.0

# Packages

No description provided by the author

# Functions

MustExtractFlowSchema extracts the schema from a flow definition.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

Schemas for flows defined in llmflow.
Schemas for tasks defined in llmflow.

# Structs

BoundedContainer is a container with a bounded length.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Template is a leaf task that is used to render a template by applying given arguments.
No description provided by the author
No description provided by the author
No description provided by the author

# Type aliases

No description provided by the author