requestLLMForceOneTool

expect open suspend override fun requestLLMForceOneTool(message: String, tool: ToolDescriptor): Message.Response(source)

Sends a message to a Large Language Model (LLM) and forces it to use a specific tool. The message becomes part of the current prompt, and the LLM is instructed to use only the specified tool.

Return

The LLM response containing the tool call.

Parameters

message

The content of the message to be sent to the LLM.

tool

The tool descriptor that the LLM must use.


expect open suspend override fun requestLLMForceOneTool(message: String, tool: Tool<*, *>): Message.Response(source)

Sends a message to a Large Language Model (LLM) and forces it to use a specific tool. The message becomes part of the current prompt, and the LLM is instructed to use only the specified tool.

Return

The LLM response containing the tool call.

Parameters

message

The content of the message to be sent to the LLM.

tool

The tool that the LLM must use.

fun requestLLMForceOneTool(message: String, tool: ToolDescriptor, executorService: ERROR CLASS: Symbol not found for ExecutorService?? = null): Message.Response(source)

Sends a request to the LLM (Large Language Model) system using a specified tool, ensuring the use of exactly one tool in the response generation process.

Return

The response generated by the LLM system as a Message.Response object.

Parameters

message

The input message or prompt to be processed by the LLM.

tool

The specific tool descriptor that defines the tool to be used.

executorService

An optional custom executor service for handling the request. Defaults to null, in which case the default dispatcher is used.


fun requestLLMForceOneTool(message: String, tool: Tool<*, *>, executorService: ERROR CLASS: Symbol not found for ExecutorService?? = null): Message.Response(source)

Sends a request to the LLM (Large Language Model) forcing the use of a specified tool and returns the response.

Return

A Message.Response object containing the result from the LLM after processing the request.

Parameters

message

The message to be sent to the LLM.

tool

The tool that the LLM is forced to use in processing the message.

executorService

Optional parameter for an ExecutorService to control the dispatching of the request. If not provided, a default dispatcher will be used.