///
import { Messages } from "../types/XAiMessage";
import { type Error, type SendContent, type Success, type SessionData } from "../types";
export type ContentType = 'TEXT' | 'IMAGE' | 'FILE' | 'JSON';
export interface ImageUrl {
url: string;
name: string;
}
export interface FileUrl {
url: string;
fileName: string;
suffix: string;
}
export interface Content {
text?: string;
imageUrl?: ImageUrl;
fileUrl?: FileUrl;
}
export interface ContentDef {
description: string;
contentType: ContentType;
content: Content;
}
export type Contents = ContentDef[];
export declare enum ActionType {
recallKnowledgeStart = "RECALL_KNOWLEDGE_START",
recallKnowledgeEnd = "RECALL_KNOWLEDGE_END",
invokeToolStart = "INVOKE_AGENT_TOOL_START",
invokeToolEnd = "INVOKE_AGENT_TOOL_END",
reasoning = "REASONING",
reasoningStart = "REASONING_START",
reasoningEnd = "REASONING_END",
componentStart = "COMPONENT_START",
componentStream = "COMPONENT_STREAM",
componentEnd = "COMPONENT_END",
suggest = "FOLLOW_UP",
response = "RESPONSE",
finish = "FINISHED"
}
export declare enum ProcessStatus {
start = "START",
end = "END"
}
export declare enum ActionAvailability {
disabled = "disabled",
enabled = "enabled",
remote = "remote"
}
export type ThinkStep = any;
export interface Action {
name: string;
description: string;
jsonSchema: string;
available?: ActionAvailability;
}
export interface BaseFields {
textSpeed?: number;
onChatDone?: () => void;
}
export interface UseAgentGeneratorProps {
url: string;
token: string;
config: any;
textSpeed?: number;
onError?: (error: Error) => void;
onSuccess?: (data: Success) => void;
onMessage?: (content: string, data: Messages) => void;
}
declare const useAgentGenerator: (params: UseAgentGeneratorProps) => {
appInfo: any;
messages: Messages[];
loading: boolean;
content: any;
sessionList: SessionData[];
currentSessionId: string;
sessionPagination: {
total: number;
pageNum: number;
pageSize: number;
};
initAppConversations: (fetchDetail?: boolean) => Promise;
reChat: () => void;
chat: (content: SendContent, extra?: any, insert?: boolean) => Promise;
createNewChat: () => void;
setCurrentSessionId: import("react").Dispatch>;
setCurrentSession: (sessionId: string) => Promise;
updateSession: (sessionId: string, title: string) => Promise;
deleteSession: (sessionId: string) => Promise;
setMessage: (messageType: string, content: any) => Promise;
setMessages: import("react").Dispatch>;
stopChat: () => void;
initPrologue: () => Promise;
};
export default useAgentGenerator;