Orchestration engine & UI for your customized LLM flow.
go install github.com/go-aie/llmflow/cmd/llmflow@latest
Run the basic flow:
OPENAI_API_KEY=<YOUR_API_KEY> llmflow run examples/basic.flow.yaml
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 runllmflow
instead.
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.
In addition to Orchestrator's built-in tasks, LLMFlow defines the following tasks and flows:
-
Tasks
-
Flows
- Basic
- Document Question Answering
- FAQ-based Question Answering
- Table Question Answering (requires TableQA)
- Table & Document Question Answering (requires TableQA)
- Tool Call
- Perplexity
Check out the documentation.