__ollama__
llms: [txt, err] = __ollama__ (Name, Value)
Base fuction for ollama class.
All parameters to Ollama must be passed as Name, Value paired input arguments. Empty parameter values are not allowed. The following parameters are supported:
'model' A character vector with the model name.
'embeddingModel' A logical scalar specifying whether the model to be loaded is an embedding model.
'prompt' A character vector with the user’s prompt.
'serverURL' A character vector with the server’s URL.
'readTimeout' A double scalar for waiting response timeout.
'writeTimeout' A double scalar for waiting request timeout.
'Query' A character vector for querying 'status' or 'version' of the ollama server.
'loadModel' A character vector with the name of the model to be loaded in the server’s memory.
'pullModel' A character vector with the name of the model to be downloaded from the Ollama library.
'copyModel' A 2-element cell array of character vectors with source and target names of the model to be copied in the server.
'deleteModel' A character vector with the name of the model to be deleted from the server.
'unloadModel' A character vector with the name of the model to be unloaded from the server’s memory.
'modelInfo' A character vector with the name of the model to retrieve information for.
'listModels' A character vector for returning the list of models available in the server either as 'cellstr' or in 'json' format.
'listRunningModels' A character vector for returning the list of modelsavailable in the server either as 'cellstr' or in 'json' format.
'imageFile' A character vector or a cell array of character vectors with the filename(s) of the image(s) to be included in a request.
'imageBase64' A character vector or a cell array of character vectors with the base64 encoded string(s) of the image(s) to be included in a request.
'options' A scalar structures whose fields with be included as optional model parameters in a request.
'message' An cell array containing the message history of a chat session to be used for the subsequent chat request.
'systemMessage' A character vector for setting a custom system message for the model during a request.
'think' A character vector for setting the thinking mode of the model during a request.
'tools' A character vector for sending a toolFunction or a toolRegistry in JSON format to the mode during a request.
'input' A cell array of character vectors to generate embeddings for.
'dimensions' An nonnegative integer scalar value specifying the dimensions of the generated embeddings.
The following conditions apply:
'Query' ingores all other paramters.
'loadModel', 'pullModel', 'copyModel', 'deleteModel', or 'unloadModel' at once.
'modelInfo' takes precedence after any of the previous parameters.
'listModels' or 'listRunningModels' at once. This only takes precedence after the 'modelInfo' paramter.
'imageFile' or 'imageBase64' at once.
'prompt', 'message', or 'input' at once.
Source Code: __ollama__