cf() - Custom Configuration

  • Request Configuration – Generates a custom configuration dictionary containing your API key and model key to override defaults when passed to gn() or ex().
Signature
ranno.cf(api_key: str, model: str) -> dict
ParameterTypeRequiredDescription
api_keystrYesProvider API key.
modelstrYesTarget model key.
ReturnsDescription
dictA 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)