Parameters for the textGenerationStream operation.

interface TextGenerationStreamParams {
    accept?: string;
    headers?: OutgoingHttpHeaders;
    input: string;
    modelId: string;
    moderations?: WatsonXAI.Moderations;
    parameters?: TextGenRequestParameters;
    projectId?: string;
    spaceId?: string;
}

Properties

accept?: string

The type of the response: application/json or text/event-stream. A character encoding can be specified by including a charset parameter. For example, 'text/event-stream;charset=utf-8'.

headers?: OutgoingHttpHeaders
input: string

The prompt to generate completions. Note: The method tokenizes the input internally. It is recommended not to leave any trailing spaces.

modelId: string

The id of the model to be used for this request. Please refer to the list of models.

moderations?: WatsonXAI.Moderations

Properties that control the moderations, for usages such as Hate and profanity (HAP) and Personal identifiable information (PII) filtering. This list can be extended with new types of moderations.

The chat related parameters.

projectId?: string

The project that contains the resource. Either space_id or project_id has to be given.

spaceId?: string

The space that contains the resource. Either space_id or project_id has to be given.