@digitalsingularity/agent-ui-chat-components
Version:
Reusable UI components for agent chat and management interfaces
50 lines (49 loc) • 1.51 kB
TypeScript
/**
* Avatar generation service for handling API calls to generate AI avatars
*/
export interface AvatarGenerationOptions {
prompt?: string;
agentName?: string;
endpoint?: string;
credentials?: RequestCredentials;
}
export interface AvatarGenerationResult {
success: boolean;
imageUrl: string;
prompt?: string;
}
/**
* Default avatar generation service that calls the standard endpoint
*/
export declare const createAvatarGenerationService: (baseConfig?: {
endpoint?: string;
credentials?: RequestCredentials;
headers?: Record<string, string>;
}) => (prompt: string, agentName?: string) => Promise<{
imageUrl: string;
}>;
/**
* Mock avatar generation service for testing/development
*/
export declare const createMockAvatarService: (delay?: number) => (_prompt: string, agentName?: string) => Promise<{
imageUrl: string;
}>;
/**
* Avatar generation service types for dependency injection
*/
export type AvatarGenerationFunction = (prompt: string, agentName?: string) => Promise<{
imageUrl: string;
}>;
declare const _default: {
createAvatarGenerationService: (baseConfig?: {
endpoint?: string;
credentials?: RequestCredentials;
headers?: Record<string, string>;
}) => (prompt: string, agentName?: string) => Promise<{
imageUrl: string;
}>;
createMockAvatarService: (delay?: number) => (_prompt: string, agentName?: string) => Promise<{
imageUrl: string;
}>;
};
export default _default;