@intelidexer/react-native-chat-screen
Version:
A chat screen for InteliDexer based AI Agents.
36 lines (35 loc) • 1.04 kB
TypeScript
import type { ChatMessage } from "./types";
export interface CompletionArgs {
baseUrl?: string;
messages: {
role: "system" | "user" | "assistant";
content: string;
imageData?: {
uri: string;
type: string;
base64?: string;
};
}[];
signal?: AbortSignal;
stream?: boolean;
onChunk?: (chunk: string) => void;
personal_context?: string;
user_id?: string;
mobile_type?: string;
api_key?: string;
}
export interface ChatConfig {
image_support: boolean;
suggested_questions: string[];
}
export declare function createChatCompletion(args: CompletionArgs): Promise<string>;
export declare function toOpenAIMessages(thread: ChatMessage[], systemPrompt?: string): {
role: "system" | "user" | "assistant";
content: string;
imageData?: {
uri: string;
type: string;
base64?: string | undefined;
} | undefined;
}[];
export declare function fetchChatConfig(baseUrl?: string): Promise<ChatConfig | null>;