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. User Prompt is specific input given by provided by the caller of this method. The user prompt is combined with the system prompted defined in the command document and presented to the language model via 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