@prexo/ai-chat-sdk
Version:
AI Chat SDK for building AI chat applications with Context and History
33 lines (30 loc) • 966 B
text/typescript
import { TelementryEvents } from './types.cjs';
import '@upstash/redis';
import 'ai';
import '@upstash/vector';
type TelementryOptions = {
enabled?: boolean;
ingestionKey?: string;
};
declare class Telementry {
private enabled;
private endpoint;
private ingestionKey?;
private sdkVersion;
private ingestionKeyPromise?;
constructor(options: TelementryOptions);
private fetchIngestionKeyCached;
private fetchIngestionKey;
/**
* Returns a string with browser details using the Navigator API.
* See: https://developer.mozilla.org/en-US/docs/Web/API/Navigator
*/
private detectBrowser;
/**
* Returns the platform/OS using the Navigator API if available.
* See: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/platform
*/
private detectPlatform;
send<K extends keyof TelementryEvents>(event: K, properties: TelementryEvents[K]): Promise<void>;
}
export { Telementry };