@copilotkit/runtime
Version:
<div align="center"> <a href="https://copilotkit.ai" target="_blank"> <img src="https://github.com/copilotkit/copilotkit/raw/main/assets/banner.png" alt="CopilotKit Logo"> </a>
139 lines (107 loc) • 3.15 kB
text/typescript
import { Field, InterfaceType, ObjectType } from "type-graphql";
import { MessageRole } from "./enums";
import { MessageStatusUnion } from "./message-status.type";
import { ResponseStatusUnion } from "./response-status.type";
import { ExtensionsResponse } from "./extensions-response.type";
import { BaseMetaEvent } from "./meta-events.type";
export abstract class BaseMessageOutput {
id: string;
createdAt: Date;
status: typeof MessageStatusUnion;
}
export class TextMessageOutput {
role: MessageRole;
content: string[];
parentMessageId?: string;
}
export class ActionExecutionMessageOutput {
name: string;
scope?: string;
arguments: string[];
parentMessageId?: string;
}
export class ResultMessageOutput {
actionExecutionId: string;
actionName: string;
result: string;
}
export class AgentStateMessageOutput {
threadId: string;
agentName: string;
nodeName: string;
runId: string;
active: boolean;
role: MessageRole;
state: string;
running: boolean;
}
export class ImageMessageOutput {
format: string;
bytes: string;
role: MessageRole;
parentMessageId?: string;
}
export class CopilotResponse {
threadId!: string;
status: typeof ResponseStatusUnion;
runId?: string;
messages: (typeof BaseMessageOutput)[];
extensions?: ExtensionsResponse;
metaEvents?: (typeof BaseMetaEvent)[];
}