field-service-agent
Version:
Field Service AI Agent - NPM package for integrating AI-powered field service management into mobile apps
48 lines • 1.83 kB
TypeScript
import { AgentContext } from './agent/types';
import { FieldServiceAgentConfig, AgentResponse } from './types';
export declare class FieldServiceAgent {
private sdk;
private agent;
private config;
private context;
private isInitialized;
private conversationHistory;
constructor(config: FieldServiceAgentConfig);
initialize(): Promise<void>;
processCommand(command: string | {
audioContent: string;
inputEncoding?: string;
inputSampleRate?: number;
}, context?: Partial<AgentContext>): Promise<AgentResponse>;
private transformAgentResponse;
updateContext(context: Partial<AgentContext>): void;
setCurrentScreen(screenType?: 'Job' | 'Client' | 'Invoice' | 'Estimate', recordId?: string): void;
setCurrentRecordId(recordId?: string): void;
setLanguage(language: string): void;
setVoiceName(voiceName: string): void;
getContext(): AgentContext | null;
updateSDK(sdk: any): void;
clearConversationHistory(): void;
getConversationHistory(): Array<{
id: string;
text: string;
isUser: boolean;
action?: any;
}>;
getRecentMessages(count?: number): Array<{
id: string;
text: string;
isUser: boolean;
action?: any;
}>;
clearContext(): void;
processVoiceCommand(command: string, context?: Partial<AgentContext>): Promise<AgentResponse & {
speechText?: string;
}>;
processVoiceInput(audioContent: string, inputEncoding?: string, inputSampleRate?: number, context?: Partial<AgentContext>): Promise<AgentResponse>;
refreshData(): Promise<void>;
getTextToSpeechAudio(text: string, language?: string): Promise<ArrayBuffer>;
getAvailableLanguages(): string[];
isReady(): boolean;
}
//# sourceMappingURL=FieldServiceAgent.d.ts.map