Parameters for the textGenerationStream operation.

interface TextGenerationStreamParams {
    headers?: OutgoingHttpHeaders;
    input: string;
    modelId: string;
    moderations?: WatsonXAI.Moderations;
    parameters?: WatsonXAI.TextGenParameters;
    projectId?: string;
    returnObject?: boolean;
    spaceId?: string;
}

Properties

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.

Properties that control the model and response.

projectId?: string

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

returnObject?: boolean
spaceId?: string

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