All Bundles

Model

Ollama model operation

Derived from: EndPoint

Operations

Code example:

chat := Chat->New("llama3");
chat->Send("How many people like in San Pablo, CA?")->PrintLine();
chat->Send("How of the population identify as Latino??")->PrintLine();
chat->Send("Thanks, what are the major landmarks?")->PrintLine();
chat->Send("Goodbye?")->PrintLine();

Copy

Copy a model

function : Copy(src:String, dest:String) ~ Bool
Parameters
NameTypeDescription
srcStringsource name of the model to copy
destStringdestination name of the model to copy

Return
TypeDescription
Booltrue if successful, false otherwise

Create

Create a model from a Modelfile description

function : Create(name:String, modelfile:String) ~ Bool
Parameters
NameTypeDescription
nameStringname of the model to create
modelfileStringcontents of the Modelfile

Return
TypeDescription
Booltrue if successful, false otherwise

Delete

Delete a model and its data.

function : Delete(name:String) ~ Bool
Parameters
NameTypeDescription
nameStringname of the model to delete

Return
TypeDescription
Booltrue if successful, false otherwise

Embeddings

Generate embeddings from a model

function : Embeddings(model:String, prompt:String) ~ Float[]
Parameters
NameTypeDescription
modelStringname of model to generate embeddings from
promptStringtext to generate embeddings for

Return
TypeDescription
Float[]true if successful, false otherwise

GetDetails

Get the model details

method : public : GetDetails() ~ ModelDetails
Return
TypeDescription
ModelDetailsmodel details

GetPulled

Get the model pulled

method : public : GetPulled() ~ ModelPulled
Return
TypeDescription
ModelPulledmodel pulled

List

List the models available

function : List() ~ Vector<Model>
Return
TypeDescription
Vector<Model>list of models available

Pull

Download a model from the ollama library

function : Pull(name:String) ~ Bool
Parameters
NameTypeDescription
nameStringname of the model to pull

Return
TypeDescription
Booltrue if successful, false otherwise

Show

Show information about a model

function : Show(name:String) ~ Model
Parameters
NameTypeDescription
nameStringname of the model to show

Return
TypeDescription
Modelmodel

ToString

String representation of the instance

method : public : ToString() ~ String
Return
TypeDescription
Stringstring representation of the instance