Class CompletionRequestBase
public abstract class CompletionRequestBase : ModelRequest
- Inheritance
-
objectRequestBodyCompletionRequestBase
- Derived
- Inherited Members
Properties
AttachedFiles
public List<IUniFile> AttachedFiles { get; set; }
Property Value
- List<IUniFile>
KeepAlive
Optional (Ollama-only). Controls how long the model will stay loaded into memory following the request.
public string KeepAlive { get; set; }
Property Value
- string
ModelOptions
Configuration options for model generation and outputs. Not all parameters may be configurable for every model.
public ModelOptions ModelOptions { get; set; }
Property Value
Models
Optional (OpenRouter-only). Alternate list of models for routing overrides.
public List<string> Models { get; set; }
Property Value
- List<string>
Prompt
Required if using OpenAI legacy models. Required for OpenRouter completion requests. The text prompt to complete
public string Prompt { get; set; }
Property Value
- string
ReasoningOptions
Optional. Configuration for model reasoning/thinking tokens
public ReasoningOptions ReasoningOptions { get; set; }
Property Value
ResponseFormat
An object specifying the format that the model must output.
Setting to { "type": "json_schema", "json_schema": { ...} }
enables Structured Outputs which ensures the model will match your supplied JSON schema.Learn more in the Structured Outputs guide.
Setting to { "type": "json_object" } enables the older JSON mode, which ensures the message the model generates is valid JSON.Using json_schema is preferred for models that support it.
public ResponseFormat ResponseFormat { get; set; }
Property Value
Stream
Optional. Enable streaming of results. Defaults to false
public bool? Stream { get; set; }
Property Value
- bool?
StreamOptions
Optional. Whether to include usage information in the response
public StreamOptions StreamOptions { get; set; }
Property Value
SystemInstruction
Optional. The system message to use for the model.
public string SystemInstruction { get; set; }
Property Value
- string
Transforms
Optional (OpenRouter-only). List of prompt transforms.
public List<string> Transforms { get; set; }
Property Value
- List<string>