View on GitHub

vrbm-AI Documentation

Official documentation for the vrbm-AI Python library

Usage Guide

vrbm‑AI exposes one main function: generate().

It sends a prompt to Ollama, enforces strict output rules, validates the type, retries on failure, and returns a Python value.

Basic Example

from vrbm import generate

value = generate("Give me a random color.", output_type="str")
print(value)

Output might be:

"blue"

Supported Output Types

vrbm‑AI can validate:

Example:

generate("Give me three animals.", output_type="list")

Unspecified Output Type

If you don’t want validation:

generate("Say hello.")

Custom Model

generate("Give me a number.", output_type="int", model="llama3.1:70b")

Disable Parsing

If you want the raw model output:

generate("Give me a number.", parse=False)

< prev. home next >