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
Name | Type | Description |
---|
src | String | source name of the model to copy |
dest | String | destination name of the model to copy |
Return
Type | Description |
---|
Bool | true if successful, false otherwise |
Create
Create a model from a Modelfile description
function : Create(name:String, modelfile:String) ~ Bool
Parameters
Name | Type | Description |
---|
name | String | name of the model to create |
modelfile | String | contents of the Modelfile |
Return
Type | Description |
---|
Bool | true if successful, false otherwise |
Delete
Delete a model and its data.
function : Delete(name:String) ~ Bool
Parameters
Name | Type | Description |
---|
name | String | name of the model to delete |
Return
Type | Description |
---|
Bool | true if successful, false otherwise |
Embeddings
Generate embeddings from a model
function : Embeddings(model:String, prompt:String) ~ Float[]
Parameters
Name | Type | Description |
---|
model | String | name of model to generate embeddings from |
prompt | String | text to generate embeddings for |
Return
Type | Description |
---|
Float[] | true if successful, false otherwise |
GetDetails
Get the model details
method : public : GetDetails() ~ ModelDetails
Return
GetPulled
Get the model pulled
method : public : GetPulled() ~ ModelPulled
Return
List
List the models available
function : List() ~ Vector<Model>
Return
Pull
Download a model from the ollama library
function : Pull(name:String) ~ Bool
Parameters
Name | Type | Description |
---|
name | String | name of the model to pull |
Return
Type | Description |
---|
Bool | true if successful, false otherwise |
Show
Show information about a model
function : Show(name:String) ~ Model
Parameters
Name | Type | Description |
---|
name | String | name of the model to show |
Return
Type | Description |
---|
Model | model |
ToString
String representation of the instance
method : public : ToString() ~ String
Return
Type | Description |
---|
String | string representation of the instance |