Skip to content

Latest commit

 

History

History
 
 

basic

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

Basic Example

Use Cases

Basic Agent

export OPENAI_API_KEY=your_openai_api_key_here
cargo run --package basic-example -- --usecase basic

Simple ReAct Agent

export OPENAI_API_KEY=your_openai_api_key_here
cargo run --package basic-example -- --usecase simple

Shows a basic event-driven agent.

Add hooks to agents

export OPENAI_API_KEY=your_openai_api_key_here
cargo run --package basic-example -- --usecase hooks

Create Agents and Tools without Macro

This is useful when dynamic tool and agent instantiation is required

export OPENAI_API_KEY=your_openai_api_key_here
cargo run --package basic-example -- --usecase manual-tool-agent

Generic Actors

export OPENAI_API_KEY=your_openai_api_key_here
cargo run --package basic-example -- --usecase actor

Edge Runtime using LiquidEdge

Download the tinyllama model from ONNX file and models weights

optimum-cli export onnx \
      --model TinyLlama/TinyLlama-1.1B-Chat-v1.0 \
      --task text-generation ./models/tinyllama

For CPU usage

cargo run --package basic-example -- --usecase edge --device cpu

For CUDA usage - Make use cuDNN and cuda drivers are installed properly

cargo run --package basic-example -- --usecase edge --device cuda