A function message in a chat.

Deprecated: Function messages have been deprecated by OpenAI in favor of tool messages.

interface ChatsFunctionMessage {
    content: string;
    name: string;
    role: "function";
}

Properties

Properties

content: string

Content of the function message. Required but nullable.

name: string

Name of the function to call.

role: "function"

Role of the messages author, in this case should always be "function".