Class ModelService
Assembly: Glitch9.AIDevKit.Provider.Ollama.dll
Syntax
public class ModelService : CrudServiceBase<OllamaClient>, ICrudService
Constructors
|
Edit this page
View Source
ModelService(OllamaClient)
Declaration
public ModelService(OllamaClient client)
Parameters
Methods
|
Edit this page
View Source
CopyModelAsync(CopyModelRequest, RequestOptions)
Declaration
public UniTask CopyModelAsync(CopyModelRequest request, RequestOptions options = null)
Parameters
Returns
|
Edit this page
View Source
CreateModelAsync(CreateModelRequest, RequestOptions)
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.
Declaration
public UniTask CreateModelAsync(CreateModelRequest request, RequestOptions options = null)
Parameters
Returns
| Type |
Description |
| UniTask |
A stream of JSON objects is returned:
{"status":"reading model metadata"}
{"status":"creating system layer"}
{"status":"using already created layer sha256:22f7f8ef5f4c791c1b03d7eb414399294764d7cc82c7e94aa81a1feb80a983a2"}
{"status":"using already created layer sha256:8c17c2ebb0ea011be9981cc3922db8ca8fa61e828c5d3f44cb6ae342bf80460b"}
{"status":"using already created layer sha256:7c23fb36d80141c4ab8cdbb61ee4790102ebd2bf7aeff414453177d4f2110e5d"}
{"status":"using already created layer sha256:2e0493f67d0c8c9c68a8aeacdf6a38a2151cb3c4c1d42accf296e19810527988"}
{"status":"using already created layer sha256:2759286baa875dc22de5394b4a925701b1896a7e3f8e53275c36f75a877a82c9"}
{"status":"writing layer sha256:df30045fe90f0d750db82a058109cecd6d4de9c90a3d75b19c09e5f64580bb42"}
{"status":"writing layer sha256:f18a68eb09bf925bb1b669490407c1b1251c5db98dc4d3d81f3088498ea55690"}
{"status":"writing manifest"}
{"status":"success"}
|
|
Edit this page
View Source
DeleteModelAsync(DeleteModelRequest, RequestOptions)
Declaration
public UniTask<DeletionStatus> DeleteModelAsync(DeleteModelRequest request, RequestOptions options = null)
Parameters
Returns
|
Edit this page
View Source
ListLocalModelsAsync(RequestOptions)
List models that are available locally.
Declaration
public UniTask<ListModelsResponse> ListLocalModelsAsync(RequestOptions options = null)
Parameters
Returns
|
Edit this page
View Source
ListRunningModelsAsync(RequestOptions)
List models that are currently loaded into memory.
Declaration
public UniTask<ListModelsResponse> ListRunningModelsAsync(RequestOptions options = null)
Parameters
Returns
|
Edit this page
View Source
PullModelAsync(PushPullModelRequest, RequestOptions)
Declaration
public UniTask PullModelAsync(PushPullModelRequest request, RequestOptions options = null)
Parameters
Returns
|
Edit this page
View Source
PushModelAsync(PushPullModelRequest, RequestOptions)
Declaration
public UniTask PushModelAsync(PushPullModelRequest request, RequestOptions options = null)
Parameters
Returns
Implements
Extension Methods