v2.3.6-1774486742
Examples
LLM Functions
Chain
Prompt
Hello World
A basic function that introduces the library.
llm-function
basic
string
Validator
A function that is able to validate whether or not a series of statements is correct.
llm-function
basic
json
Intent
A function that identifies the intent of a user’s input.
llm-function
basic
json
Extractor
A function that extracts information from an input and returns it in a structured format.
llm-function
basic
parser
Combine Two Executors
A single function that wraps 2 executor functions
llm-function
simple
parser
Write Code from Spec
A function that generates code from a specification.
llm-function
simple
markdownCodeBlock
Write Tests from Code
A function that generates code from a specification.
llm-function
simple
markdownCodeBlock
Loading Prompts Remotely
A function that generates code from a specification.
prompt
simple
Basic Self-Refinement Loop
An orchestration function that retries generating an answer until it includes a required word and is concise.
chain
simple
Conditional Logic and Branching
Use LLM outputs to control branching and route to specialized executors based on intent.
chain
simple
Story Writing with Sequential Composition
Takes an idea through outline to story using chained LLM calls.
chain
simple
