Completion method (NotesLLMRequest - LotusScript)

Sends a chat completion request to a large language model (LLM) hosted by the Domino IQ server.

Defined in

NotesLLMRequest

Syntax

NotesLLMRequest.completion(SERVER$, COMMAND$, userPROMPT$)SERVER$

Parameters

SERVER$

String. The Domino Server IQ name that is needed to send the request. If empty, the request will be routed to the Domino IQ server configured to service the command.

COMMAND$

String. The name of a command document defined in the Domino IQ configuration database. The command document specifies a system prompt that guides the LLM behavior and responses.

userPROMPT$

String. The user prompt is the specific input given by the caller of this method. This prompt is merged with the system prompt defined in the command document and then presented to the language model through the Domino IQ server.

Return value

NotesLLMResponse

Note: If the request is not success, an Exception will raise and we do not receive NotesLLMResponse, using LotusScript On Error to catch the exception. The exception can be vary depending on the situation cause the query does not succeed. For example you will receive "Unable to find path to server" if your server parameter is not the server host Domino IQ server or "Entry not found" if your Command parameter is not the command configured in Domino IQ configuration database.

Example