user
このコンテンツはまだ日本語訳がありません。
function user(input, options?): object;
Creates a user message entry
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
|
| |
The input message from the user |
|
|
Any additional options that will be directly passed to the model |
Returns
Section titled “Returns”a message entry
content
Section titled “content”content: | string | ( | { providerData?: Record<string, any>; text: string; type: "input_text";} | { image: | string | { id: string; }; providerData?: Record<string, any>; type: "input_image";} | { file: | string | { id: string; }; providerData?: Record<string, any>; type: "input_file";} | { audio: | string | { id: string; }; format?: null | string; providerData?: Record<string, any>; transcript?: null | string; type: "audio";})[];
The content of the message.
optional id: string;
An ID to identify the item. This is optional by default. If a model provider absolutely requires this field, it will be validated on the model level.
providerData?
Section titled “providerData?”optional providerData: Record<string, any>;
Additional optional provider specific data. Used for custom functionality or model provider specific fields.
role: "user";
Representing a message from the user
optional type: "message";
Any item without a type is treated as a message