Class CreateModelRequest
- Namespace
- OllamaSharp.Models
- Assembly
- OllamaSharp.dll
Create a model from:
another model;
a safetensors directory; or
a GGUF file.
If you are creating a model from a safetensors directory or from a GGUF file,
you must [create a blob] for each of the files and then use the file name and SHA256
digest associated with each blob in the files field.
[JsonUnmappedMemberHandling(JsonUnmappedMemberHandling.Skip)]
public class CreateModelRequest : OllamaRequest
- Inheritance
-
CreateModelRequest
- Inherited Members
Properties
Adapters
A dictionary of file names to SHA256 digests of blobs for LORA adapters (optional)
[JsonPropertyName("adapters")]
public Dictionary<string, string>? Adapters { get; set; }
Property Value
Files
A dictionary of file names to SHA256 digests of blobs to create the model from (optional)
[JsonPropertyName("files")]
public Dictionary<string, string>? Files { get; set; }
Property Value
From
Name of an existing model to create the new model from (optional)
[JsonPropertyName("from")]
public string? From { get; set; }
Property Value
License
A string or list of strings containing the license or licenses for the model (optional)
[JsonPropertyName("license")]
public object? License { get; set; }
Property Value
Messages
A list of message objects used to create a conversation (optional)
[JsonPropertyName("message")]
public IEnumerable<Message>? Messages { get; set; }
Property Value
Model
Name of the model to create
[JsonPropertyName("model")]
public string? Model { get; set; }
Property Value
Parameters
A dictionary of parameters for the model (optional)
[JsonPropertyName("parameters")]
public Dictionary<string, object>? Parameters { get; set; }
Property Value
Quantize
Set the quantization level for quantize model when importing (e.g. q4_0, optional)
[JsonPropertyName("quantize")]
public string? Quantize { get; set; }
Property Value
Stream
If false the response will be returned as a single response object, rather than a stream of objects (optional)
[JsonPropertyName("stream")]
public bool Stream { get; set; }
Property Value
System
A string containing the system prompt for the model (optional)
[JsonPropertyName("system")]
public string? System { get; set; }
Property Value
Template
The prompt template for the model (optional)
[JsonPropertyName("template")]
public string? Template { get; set; }