Usage
Ollama main functionality
Section titled “Ollama main functionality”Function: ollama_generate
Section titled “Function: ollama_generate”Description: Uses ollama to generate a reply to the given prompt
Input parameters:
PROMPT(required): The input prompt for the LLM.model_id(optional): The ollama identifier of the model to use for generation.
Return type:
clob(2G) ccsid 1208
Return value:
- The generated reply.
Ollama utility functions
Section titled “Ollama utility functions”procedure: ollama_setserverforjob
Section titled “procedure: ollama_setserverforjob”Description: sets the ollama server to be used for this job Input parameters:
HOSTNAME(required): The IP address or hostname of the ollama server.
procedure: ollama_setserverforme
Section titled “procedure: ollama_setserverforme”Description: sets the ollama server to be used for this user profile (persists across jobs) Input parameters:
HOSTNAME(required): The IP address or hostname of the ollama server.
procedure: ollama_setportforjob
Section titled “procedure: ollama_setportforjob”Description: sets the ollama server port to be used for this job Input parameters:
PORT(required): The ollama server port.
procedure: ollama_setportforme
Section titled “procedure: ollama_setportforme”Description: sets the ollama server port to be used for this user profile (persists across jobs). Input parameters:
PORT(required): The ollama server port.
procedure: ollama_setmodelforjob
Section titled “procedure: ollama_setmodelforjob”Description: sets the large language model (LLM) to be used for this job Input parameters:
MODEL(required): The ollama identifier of the model to use.
procedure: ollama_setmodelforme
Section titled “procedure: ollama_setmodelforme”Description: sets the large language model (LLM) to be used for this user profile (persists across jobs) Input parameters:
MODEL(required): The ollama identifier of the model to use.
procedure: ollama_setprotocolforjob
Section titled “procedure: ollama_setprotocolforjob”Description: sets the protocol to be used for this job Input parameters:
PROTOCOL(required):http/https
procedure: ollama_setprotocolforjob
Section titled “procedure: ollama_setprotocolforjob”Description: sets the protocol to be used for this user profile (persists across jobs)
Input parameters:
PROTOCOL(required):http/https