Llama

Meta Llama API examples for runs, images, knowledge, memory, metrics, storage, structured output, and tools.

ExampleDescription
Async KnowledgeLoad knowledge into PgVector and answer asynchronously.
Meta BasicRun sync, async, and streaming requests.
DbStore sessions in Postgres and include previous turns.
Meta Image Input BytesSend local JPEG bytes as image input.
Meta Image Input FileSend a local JPEG file as image input.
KnowledgeRetrieve answers from PDF knowledge stored in PgVector.
MemoryPersist user memories and conversation summaries.
Meta MetricsInspect message and run metrics.
Meta Structured OutputRequest a JSON schema and validate a movie script.
Tool UseLook up stock prices with YFinance tools.