@gravityai-dev/openai
Version:
OpenAI integration for Gravity workflow system
39 lines • 1.25 kB
TypeScript
export declare const getNodeCredentials: (context: any, credentialName: string) => Promise<any>;
export declare const saveTokenUsage: (usage: any) => Promise<void>;
export declare const createLogger: (name: string) => any;
export declare const getConfig: () => any;
export declare const getRedisClient: () => any;
export declare const openAILogger: any;
export declare const openAIStreamLogger: any;
export declare const openAIServiceLogger: any;
export declare const embeddingLogger: any;
export declare const OUTPUT_CHANNEL = "gravity:output";
/**
* Build a unified GravityEvent structure
*/
export declare function buildOutputEvent(config: {
eventType: string;
chatId: string;
conversationId: string;
userId: string;
providerId?: string;
data: Record<string, any>;
}): Record<string, any>;
/**
* Publish a message chunk event - Optimized version
*/
export declare function publishMessageChunk(config: {
text: string;
index: number;
chatId: string;
conversationId: string;
userId: string;
providerId: string;
workflowId?: string;
workflowRunId?: string;
metadata?: Record<string, any>;
}): Promise<{
channel: string;
success: boolean;
}>;
//# sourceMappingURL=platform.d.ts.map