import { type AIMLAPIClient } from '../client'; /** * Bagoodex Image Result */ export interface BagoodexImageResult { source?: string; original: string; title?: string; source_name?: string; } /** * Bagoodex Video Result */ export interface BagoodexVideoResult { link: string; thumbnail: string; title?: string; } /** * Bagoodex Knowledge Result */ export interface BagoodexKnowledgeResult { title?: string; type?: string; description?: string; born?: string; died?: string; } /** * Bagoodex Weather Result */ export interface BagoodexWeatherResult { type?: string; temperature?: string; unit?: string; precipitation?: string; humidity?: string; wind?: string; location?: string; date?: string; weather?: string; thumbnail?: string; forecast?: Array<{ day: string; temperature: { high: string; low: string; }; thumbnail: string; weather: string; humidity: string; precipitation: string; wind: string; }>; hourly_forecast?: Array<{ time: string; thumbnail: string; weather: string; temperature: string; precipitation: string; humidity: string; wind: string; }>; } /** * Bagoodex Local Map Result */ export interface BagoodexLocalMapResult { link?: string; image?: string; gps_coordinates?: { latitude: number; longitude: number; }; } /** * Bagoodex Links Result */ export interface BagoodexLinksResult { query: string; links: Array<{ url: string; title: string; description?: string; domain?: string; }>; } /** * Bagoodex Search Response (for arrays like images, videos) */ export type BagoodexArrayResponse = T[] & { metadata?: BagoodexMetadata; }; /** * Bagoodex Search Response (for objects like links) */ export interface BagoodexLinksResponse { query: string; links: Array<{ url: string; title: string; description?: string; domain?: string; }>; metadata?: BagoodexMetadata; } /** * Bagoodex metadata */ export interface BagoodexMetadata { query: string; timestamp: string; source: string; } /** * Chat completion response for generating followup_id */ export interface BagoodexChatResponse { id: string; object: string; created: number; model: string; choices: Array<{ index: number; message: { role: string; content: string | null; }; finish_reason: string; }>; usage?: { prompt_tokens: number; completion_tokens: number; total_tokens: number; }; } /** * Bagoodex Search resource for internal AI services */ export declare class Bagoodex { private readonly _client; constructor(_client: AIMLAPIClient); /** * Generate followup_id using chat completion * @private */ private generateFollowupId; /** * Search for images. * @see https://docs.aimlapi.com/api-reference/bagoodex/images * * @example * ```typescript * const results = await client.bagoodex.searchImages("cute cats"); * console.log(results[0].original); * ``` */ searchImages(query: string): Promise>; /** * Search for videos. * @see https://docs.aimlapi.com/api-reference/bagoodex/videos * * @example * ```typescript * const results = await client.bagoodex.searchVideos("python tutorial"); * console.log(results[0].link); * ``` */ searchVideos(query: string): Promise>; /** * Search for knowledge/information. * @see https://docs.aimlapi.com/api-reference/bagoodex/knowledge * * @example * ```typescript * const results = await client.bagoodex.searchKnowledge("how does photosynthesis work"); * console.log(results.results.title); * ``` */ searchKnowledge(query: string): Promise; /** * Get weather information for a location. * @see https://docs.aimlapi.com/api-reference/bagoodex/weather * * @example * ```typescript * const weather = await client.bagoodex.getWeather("New York, NY"); * console.log(`Temperature: ${weather.results.temperature}°${weather.results.unit}`); * ``` */ getWeather(location: string): Promise; /** * Get local map information for a query. * @see https://docs.aimlapi.com/api-reference/bagoodex/local-map * * @example * ```typescript * const map = await client.bagoodex.getLocalMap("coffee shops in downtown Seattle"); * console.log(map.results.link); * ``` */ getLocalMap(query: string): Promise; /** * Get links for a query. * @see https://docs.aimlapi.com/api-reference/bagoodex/links * * @example * ```typescript * const links = await client.bagoodex.getLinks("TypeScript documentation"); * console.log(links.links); * ``` */ getLinks(query: string): Promise; } //# sourceMappingURL=bagoodex.d.ts.map