API reference

LlamaApiProvider Class

Fields

maxCompletionTokens : int
Signature
int maxCompletionTokens
repetitionPenalty : float
Signature
float repetitionPenalty
temperature : float
Signature
float temperature
topP : float
Signature
float topP

Protected Properties

DefaultSupportedTypes : override InferenceType
[Get]
Signature
override InferenceType DefaultSupportedTypes

Properties

SupportsVision : bool
[Get]
Indicates whether this provider prepares and sends image inputs for supported multimodal models.
Disable for pure-text models to reduce request overhead and validation checks.
See IChatTask and your model's capabilities on the provider dashboard.
Signature
bool SupportsVision

Methods

ChatAsync ( req , stream , ct )
Sends a chat request to Llama-API and extracts the assistant text, handling vision inputs when enabled.
Applies safe defaults for temperature and max tokens unless overridden.
Signature
async Task< ChatResponse > ChatAsync(ChatRequest req, IProgress< ChatDelta > stream=null, CancellationToken ct=default)
Parameters
req: ChatRequest  User message and optional images; validated against provider capabilities.
stream: IProgress< ChatDelta >  Optional partial output callback; final text is still returned.
ct: CancellationToken  Cancellation token for image prep and HTTP.
Returns
async Task< ChatResponse >  ChatResponse with assistant text and provider metadata.