export interface IReturn<T> {
    createResponse(): T;
}
export interface IPost {
}
/** @description The tool calls generated by the model, such as function calls. */
export declare class ToolCall {
    /** @description The ID of the tool call. */
    id: string;
    /** @description The type of the tool. Currently, only `function` is supported. */
    type: string;
    /** @description The function that the model called. */
    function: string;
    constructor(init?: Partial<ToolCall>);
}
/** @description A list of messages comprising the conversation so far. */
export declare class OpenAiMessage {
    /** @description The contents of the message. */
    content: string;
    /** @description The role of the author of this message. Valid values are `system`, `user`, `assistant` and `tool`. */
    role: string;
    /** @description An optional name for the participant. Provides the model information to differentiate between participants of the same role. */
    name?: string;
    /** @description The tool calls generated by the model, such as function calls. */
    tool_calls?: ToolCall[];
    /** @description Tool call that this message is responding to. */
    tool_call_id?: string;
    constructor(init?: Partial<OpenAiMessage>);
}
export declare enum ResponseFormat {
    Text = "text",
    JsonObject = "json_object"
}
export declare class OpenAiResponseFormat {
    /** @description An object specifying the format that the model must output. Compatible with GPT-4 Turbo and all GPT-3.5 Turbo models newer than gpt-3.5-turbo-1106. */
    response_format: ResponseFormat;
    constructor(init?: Partial<OpenAiResponseFormat>);
}
export declare enum OpenAiToolType {
    Function = "function"
}
export declare class OpenAiTools {
    /** @description The type of the tool. Currently, only function is supported. */
    type: OpenAiToolType;
    constructor(init?: Partial<OpenAiTools>);
}
/** @description Given a list of messages comprising a conversation, the model will return a response. */
export declare class OpenAiChat {
    /** @description A list of messages comprising the conversation so far. */
    messages: OpenAiMessage[];
    /** @description ID of the model to use. See the model endpoint compatibility table for details on which models work with the Chat API */
    model: string;
    /** @description Number between `-2.0` and `2.0`. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. */
    frequency_penalty?: number;
    /** @description Modify the likelihood of specified tokens appearing in the completion. */
    logit_bias?: {
        [index: number]: number;
    };
    /** @description Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned in the content of message. */
    logprobs?: boolean;
    /** @description An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to true if this parameter is used. */
    top_logprobs?: number;
    /** @description The maximum number of tokens that can be generated in the chat completion. */
    max_tokens?: number;
    /** @description How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep `n` as `1` to minimize costs. */
    n?: number;
    /** @description Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. */
    presence_penalty?: number;
    /** @description An object specifying the format that the model must output. Compatible with GPT-4 Turbo and all GPT-3.5 Turbo models newer than `gpt-3.5-turbo-1106`. Setting Type to ResponseFormat.JsonObject enables JSON mode, which guarantees the message the model generates is valid JSON. */
    response_format?: OpenAiResponseFormat;
    /** @description This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed, and you should refer to the system_fingerprint response parameter to monitor changes in the backend. */
    seed?: number;
    /** @description Up to 4 sequences where the API will stop generating further tokens. */
    stop?: string[];
    /** @description If set, partial message deltas will be sent, like in ChatGPT. Tokens will be sent as data-only server-sent events as they become available, with the stream terminated by a `data: [DONE]` message. */
    stream?: boolean;
    /** @description What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. */
    temperature?: number;
    /** @description An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. */
    top_p?: number;
    /** @description A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. */
    tools?: OpenAiTools[];
    /** @description A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. */
    user?: string;
    constructor(init?: Partial<OpenAiChat>);
}
export declare class ResponseError {
    errorCode: string;
    fieldName: string;
    message: string;
    meta: {
        [index: string]: string;
    };
    constructor(init?: Partial<ResponseError>);
}
export declare class ResponseStatus {
    errorCode: string;
    message: string;
    stackTrace: string;
    errors: ResponseError[];
    meta: {
        [index: string]: string;
    };
    constructor(init?: Partial<ResponseStatus>);
}
export declare class ChoiceMessage {
    /** @description The contents of the message. */
    content: string;
    /** @description The tool calls generated by the model, such as function calls. */
    tool_calls?: ToolCall[];
    /** @description The role of the author of this message. */
    role: string;
    constructor(init?: Partial<ChoiceMessage>);
}
export declare class Choice {
    /** @description The reason the model stopped generating tokens. This will be stop if the model hit a natural stop point or a provided stop sequence, length if the maximum number of tokens specified in the request was reached, content_filter if content was omitted due to a flag from our content filters, tool_calls if the model called a tool */
    finish_reason: string;
    /** @description The index of the choice in the list of choices. */
    index: number;
    /** @description A chat completion message generated by the model. */
    message: ChoiceMessage;
    constructor(init?: Partial<Choice>);
}
/** @description Usage statistics for the completion request. */
export declare class OpenAiUsage {
    /** @description Number of tokens in the generated completion. */
    completion_tokens: number;
    /** @description Number of tokens in the prompt. */
    prompt_tokens: number;
    /** @description Total number of tokens used in the request (prompt + completion). */
    total_tokens: number;
    constructor(init?: Partial<OpenAiUsage>);
}
export declare class OpenAiChatResponse {
    /** @description A unique identifier for the chat completion. */
    id: string;
    /** @description A list of chat completion choices. Can be more than one if n is greater than 1. */
    choices: Choice[];
    /** @description The Unix timestamp (in seconds) of when the chat completion was created. */
    created: number;
    /** @description The model used for the chat completion. */
    model: string;
    /** @description This fingerprint represents the backend configuration that the model runs with. */
    system_fingerprint: string;
    /** @description The object type, which is always chat.completion. */
    object: string;
    /** @description Usage statistics for the completion request. */
    usage: OpenAiUsage;
    responseStatus?: ResponseStatus;
    constructor(init?: Partial<OpenAiChatResponse>);
}
/** @description Given a list of messages comprising a conversation, the model will return a response. */
export declare class OpenAiChatCompletion extends OpenAiChat implements IReturn<OpenAiChatResponse>, IPost {
    /** @description Provide a unique identifier to track requests */
    refId?: string;
    /** @description Specify which AI Provider to use */
    provider?: string;
    /** @description Categorize like requests under a common group */
    tag?: string;
    constructor(init?: Partial<OpenAiChatCompletion>);
    getTypeName(): string;
    getMethod(): string;
    createResponse(): OpenAiChatResponse;
}
//# sourceMappingURL=openai.d.ts.map