Documentation
Namespaces
Prompt
interfaces
Msg

Interface: Msg

Generic/default OpenAI message without any narrowing applied

Properties

PropertyTypeDescriptionSource
contentnull | stringThe contents of the message. content is required for all messages, and may be null for assistant messages with function calls.src/prompt/types.ts:81 (opens in a new tab)
function_call?FunctionThe name and arguments of a function that should be called, as generated by the model.src/prompt/types.ts:85 (opens in a new tab)
name?stringThe name of the author of this message. name is required if role is
function, and it should be the name of the function whose response is in the
content. May contain a-z, A-Z, 0-9, and underscores, with a maximum length of
64 characters.
src/prompt/types.ts:98 (opens in a new tab)
roleRoleThe role of the messages author. One of system, user, assistant, 'tool', or function.src/prompt/types.ts:83 (opens in a new tab)
tool_call_id?stringTool call that this message is responding to.src/prompt/types.ts:91 (opens in a new tab)
tool_calls?Tool[]The tool calls generated by the model, such as function calls.src/prompt/types.ts:87 (opens in a new tab)