import * as Core from 'groq-sdk/core';
import { APIResource } from 'groq-sdk/resource';
import * as CompletionsAPI from 'groq-sdk/resources/chat/completions';
import { Stream } from 'groq-sdk/lib/streaming';
import { ChatCompletionChunk } from 'groq-sdk/lib/chat_completions_ext';
export declare class Completions extends APIResource {
    /**
     * Creates a completion for a chat prompt
     */
    create(body: ChatCompletionCreateParamsNonStreaming, options?: Core.RequestOptions): Core.APIPromise<ChatCompletion>;
    create(body: ChatCompletionCreateParamsStreaming, options?: Core.RequestOptions): Core.APIPromise<Stream<ChatCompletionChunk>>;
    create(body: ChatCompletionCreateParamsBase, options?: Core.RequestOptions): Core.APIPromise<Stream<ChatCompletionChunk> | ChatCompletion>;
}
export interface ChatCompletion {
    choices: Array<ChatCompletion.Choice>;
    id?: string;
    created?: number;
    model?: string;
    object?: string;
    system_fingerprint?: string;
    usage?: ChatCompletion.Usage;
}
export declare namespace ChatCompletion {
    interface Choice {
        finish_reason: string;
        index: number;
        logprobs: Choice.Logprobs;
        message: Choice.Message;
    }
    namespace Choice {
        interface Logprobs {
            content?: Array<Logprobs.Content>;
        }
        namespace Logprobs {
            interface Content {
                token?: string;
                bytes?: Array<number>;
                logprob?: number;
                top_logprobs?: Array<Content.TopLogprob>;
            }
            namespace Content {
                interface TopLogprob {
                    token?: string;
                    bytes?: Array<number>;
                    logprob?: number;
                }
            }
        }
        interface Message {
            content: string;
            role: string;
            tool_calls?: Array<Message.ToolCall>;
        }
        namespace Message {
            interface ToolCall {
                id?: string;
                function?: ToolCall.Function;
                type?: string;
            }
            namespace ToolCall {
                interface Function {
                    arguments?: string;
                    name?: string;
                }
            }
        }
    }
    interface Usage {
        completion_time?: number;
        completion_tokens?: number;
        prompt_time?: number;
        prompt_tokens?: number;
        total_time?: number;
        total_tokens?: number;
    }
}
export interface ChatCompletionCreateParamsBase {
    messages: Array<CompletionCreateParams.Message>;
    model: string;
    frequency_penalty?: number;
    logit_bias?: Record<string, number>;
    logprobs?: boolean;
    max_tokens?: number;
    n?: number;
    presence_penalty?: number;
    response_format?: CompletionCreateParams.ResponseFormat;
    seed?: number;
    /**
     * Up to 4 sequences where the API will stop generating further tokens. The
     * returned text will not contain the stop sequence.
     */
    stop?: string | null | Array<string>;
    stream?: boolean;
    temperature?: number;
    tool_choice?: CompletionCreateParams.ToolChoice;
    tools?: Array<CompletionCreateParams.Tool>;
    top_logprobs?: number;
    top_p?: number;
    user?: string;
}
export declare namespace CompletionCreateParams {
    interface Message {
        content: string;
        role: string;
        name?: string;
        /**
         * ToolMessage Fields
         */
        tool_call_id?: string;
        /**
         * AssistantMessage Fields
         */
        tool_calls?: Array<Message.ToolCall>;
    }
    namespace Message {
        interface ToolCall {
            id?: string;
            function?: ToolCall.Function;
            type?: string;
        }
        namespace ToolCall {
            interface Function {
                arguments?: string;
                name?: string;
            }
        }
    }
    interface ResponseFormat {
        type?: string;
    }
    interface ToolChoice {
        string?: string;
        toolChoice?: ToolChoice.ToolChoice;
    }
    namespace ToolChoice {
        interface ToolChoice {
            function?: ToolChoice.Function;
            type?: string;
        }
        namespace ToolChoice {
            interface Function {
                name?: string;
            }
        }
    }
    interface Tool {
        function?: Tool.Function;
        type?: string;
    }
    namespace Tool {
        interface Function {
            description?: string;
            name?: string;
            parameters?: Record<string, unknown>;
        }
    }
}
export declare namespace Completions {
    export import ChatCompletion = CompletionsAPI.ChatCompletion;
    export import CompletionCreateParams = CompletionsAPI.CompletionCreateParams;
}
export interface ChatCompletionCreateParamsNonStreaming extends ChatCompletionCreateParamsBase {
    stream?: false;
}
export interface ChatCompletionCreateParamsStreaming extends ChatCompletionCreateParamsBase {
    stream: true;
}
export type ChatCompletionCreateParams = ChatCompletionCreateParamsNonStreaming | ChatCompletionCreateParamsStreaming;
//# sourceMappingURL=completions.d.ts.map