/** * ChatGPT Conversation Service * * API layer for storing ChatGPT conversation data on backend. * Sends extracted user messages to /llm-data/store endpoint. * Also handles ChatGPT memories via /llm-data/store-memories endpoint. * * MATCHES iOS: onairos-flutter/ios/Classes/OnairosChatGPTConnectorPlugin.swift * - Sends ONE request per conversation (not all at once) * - Uses format: { conversationId, messages[], context } * - Platform: "mobile-chatgpt" * - Memories sent to /llm-data/store-memories */ /** * Structure of conversation messages extracted from ChatGPT */ export interface ConversationMessage { conversation_id: string; title: string; user_messages: string[]; } /** * Response from backend /llm-data/store endpoint */ export interface StoreChatGPTDataResponse { success: boolean; message?: string; error?: string; data?: any; } /** * Store ChatGPT conversations on backend * MATCHES iOS: Sends one request per conversation * * @param userId - Username or identifier * @param conversations - Array of conversations with user messages * @returns Response indicating success/failure with metadata */ export declare const storeChatGPTConversations: (userId: string, conversations: ConversationMessage[]) => Promise; /** * ChatGPT Memories Data structure (from ChatGPT API) */ export interface ChatGPTMemoriesData { items?: Array<{ id: string; content: string; created_at?: string; [key: string]: any; }>; memory_entries?: Array<{ id: string; content: string; created_at?: string; [key: string]: any; }>; memories?: Array<{ id: string; content: string; updated_at?: string; status?: string; conversation_id?: string; created_timestamp?: string | null; last_updated?: string | null; [key: string]: any; }>; memory_max_tokens?: number; memory_num_tokens?: number; [key: string]: any; } /** * Response from backend /llm-data/store-memories endpoint */ export interface StoreMemoriesResponse { success: boolean; message?: string; error?: string; data?: { memoriesCount?: number; [key: string]: any; }; } /** * Store ChatGPT user preferences (custom instructions) on backend * Sends to /llm-data/store-memories with memoryType: 'user_system_messages' * Backend stores this in userSystemPrefs. * * @param preferencesData - Raw ChatGPT user_system_messages API response */ export declare const storeChatGPTUserPreferences: (preferencesData: any) => Promise; /** * Store ChatGPT memories on backend * MATCHES iOS: OnairosChatGPTConnectorPlugin.swift sendMemoriesToBackend() * * @param memoriesData - Raw ChatGPT memories JSON * @returns Response indicating success/failure with metadata */ export declare const storeChatGPTMemories: (memoriesData: ChatGPTMemoriesData) => Promise; /** * Store LLM conversations for any platform tag (e.g. 'mobile-gemini', 'mobile-chatgpt'). * Same wire format as storeChatGPTConversations but platform-agnostic. */ export declare const storeLLMConversations: (userId: string, conversations: ConversationMessage[], platformTag: string) => Promise; //# sourceMappingURL=chatGPTConversationService.d.ts.map