@langgraph-js/sdk
Version:
The UI SDK for LangGraph - seamlessly integrate your AI agents with frontend interfaces
19 lines (18 loc) • 658 B
TypeScript
import { RenderMessage } from "../LangGraphClient.js";
import { LangGraphClient } from "../LangGraphClient.js";
export type DeepPartial<T> = {
[P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
};
export declare class ToolRenderData<I, D> {
message: RenderMessage;
client: LangGraphClient;
constructor(message: RenderMessage, client: LangGraphClient);
get state(): "idle" | "done" | "loading";
get input(): I | null;
get output(): string;
getJSONOutput(): D;
/** 如果解析失败,则返回 null */
getJSONOutputSafe(): D | null;
getInputRepaired(): DeepPartial<I>;
response(data: D): void;
}