import type { ChatCompletionMessageParam } from "openai/resources/chat"; export type GrokMessage = ChatCompletionMessageParam; export interface GrokTool { type: "function"; function: { name: string; description: string; parameters: { type: "object"; properties: Record; required: string[]; }; }; } export interface GrokToolCall { id: string; type: "function"; function: { name: string; arguments: string; }; } export interface SearchParameters { mode?: "auto" | "on" | "off"; } export interface SearchOptions { search_parameters?: SearchParameters; } export interface GrokResponse { choices: Array<{ message: { role: string; content: string | null; tool_calls?: GrokToolCall[]; }; finish_reason: string; }>; } export declare class GrokClient { private client; private currentModel; private defaultMaxTokens; constructor(apiKey: string, model?: string, baseURL?: string); setModel(model: string): void; getCurrentModel(): string; chat(messages: GrokMessage[], tools?: GrokTool[], model?: string, searchOptions?: SearchOptions): Promise; chatStream(messages: GrokMessage[], tools?: GrokTool[], model?: string, searchOptions?: SearchOptions): AsyncGenerator; search(query: string, searchParameters?: SearchParameters): Promise; }