assistant
此内容尚不支持你的语言。
function assistant(content, options?): object;Creates an assistant message entry for example for multi-shot prompting
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
|
|
| |
The assistant response. |
|
|
|
Any additional options that will be directly passed to the model. |
Returns
Section titled “Returns”object
A message entry.
content
Section titled “content”content: ( | { providerData?: Record<string, any>; refusal: string; type: "refusal";} | { providerData?: Record<string, any>; text: string; type: "output_text";} | { audio: | string | { id: string; }; format?: string | null; providerData?: Record<string, any>; transcript?: string | null; type: "audio";} | { image: string; providerData?: Record<string, any>; type: "image";})[];optional id: string;providerData?
Section titled “providerData?”optional providerData: Record<string, any>;role: "assistant";status
Section titled “status”status: "in_progress" | "completed" | "incomplete";optional type: "message";