Skip to main content

Function: isMessage()

function isMessage(
  obj: any,
): obj is {
  content: string;
  role:
    | "function"
    | "agent"
    | "tool"
    | "user"
    | "assistant"
    | "developer"
    | "system";
  tool_call_id?: null | string;
  tool_calls?:
    | null
    | { function: { arguments: string; name: string }; id: string }[];
};
Defined in: src/types/message.types.ts

Parameters

obj

any

Returns

obj is { content: string; role: “function” | “agent” | “tool” | “user” | “assistant” | “developer” | “system”; tool_call_id?: null | string; tool_calls?: null | { function: { arguments: string; name: string }; id: string }[] }