cf() - Custom Configuration
- Request Configuration – Generates a custom configuration dictionary containing your API key and model key to override defaults when passed to
gn()orex().
Signature
ranno.cf(api_key: str, model: str) -> dict| Parameter | Type | Required | Description |
|---|---|---|---|
| api_key | str | Yes | Provider API key. |
| model | str | Yes | Target model key. |
| Returns | Description |
|---|---|
| dict | A dictionary with configuration keys. |
cf() - API
from ranno import gn, ex, cf
# Configure custom credentials and model
my_config = cf(api_key="YOUR_GEMINI_API_KEY", model="gemini-3.1-flash-lite")
# Run generation with custom config
print(gn("Plot a sine wave", config=my_config))
# Run execution with custom config
ex("Plot correlation heatmap", data="data.csv", config=my_config)