chat


Description:

public async Chat chat (string model, string text, Options? options = null, Cancellable? cancellable = null) throws Error

Legacy chat method for backward compatibility.

Creates a basic Chat object with the user text and executes it. No prompt generation is performed - the text is used as-is. For agent- based conversations, use AgentHandler instead.

Note:

This method does NOT handle system messages - that's the agent's job. This is a minimal implementation for backward compatibility only.

Parameters:

model

The model name to use for the chat

text

The user's input text

options

Optional Call.Options for the chat request

cancellable

Optional cancellable for cancelling the request

Returns:

The Response from executing the chat call