Interface ICompletionArgs

Interface representing the arguments required to request a completion. Encapsulates context and inputs for generating a model response.

interface ICompletionArgs {
    agentName?: string;
    clientId?: string;
    format?: IOutlineFormat;
    messages: (IModelMessage<object> | IOutlineMessage)[];
    mode: ExecutionMode;
    outlineName?: string;
    tools?: ITool[];
}

Properties

agentName?: string

The name of the agent for which the completion is requested. This is used to identify the agent context in which the completion will be generated.

clientId?: string

The unique identifier for the client making the request. This is used to track the request and associate it with the correct client context. For outline completions, this being skipped

Optional format for the outline, specifying how the completion should be structured. This is used to define the expected output format for JSON completions. If not provided, the default outline format will be used.

messages: (IModelMessage<object> | IOutlineMessage)[]

An array of model messages providing the conversation history or context for the completion.

mode: ExecutionMode

The source of the last message, indicating whether it originated from a tool or user.

outlineName?: string

The outline used for json completions, if applicable. This is the name of the outline schema that defines the structure of the expected JSON response. Used to ensure that the completion adheres to the specified outline format.

tools?: ITool[]

Optional array of tools available for the completion process (e.g., for tool calls).