import * as z from "zod/v3";
import { ClosedEnum } from "../../types/enums.js";
import { Result as SafeParseResult } from "../../types/fp.js";
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
export type DeploymentInvokeGlobals = {
    environment?: string | undefined;
    contactId?: string | undefined;
};
/**
 * Indicates the type of model used to generate the response
 */
export declare const DeploymentInvokeObject: {
    readonly Chat: "chat";
    readonly Completion: "completion";
    readonly Image: "image";
};
/**
 * Indicates the type of model used to generate the response
 */
export type DeploymentInvokeObject = ClosedEnum<typeof DeploymentInvokeObject>;
/**
 * The provider used to generate the response
 */
export declare const Provider: {
    readonly Openai: "openai";
    readonly Groq: "groq";
    readonly Cohere: "cohere";
    readonly Azure: "azure";
    readonly Aws: "aws";
    readonly Google: "google";
    readonly GoogleAi: "google-ai";
    readonly Huggingface: "huggingface";
    readonly Togetherai: "togetherai";
    readonly Perplexity: "perplexity";
    readonly Anthropic: "anthropic";
    readonly Leonardoai: "leonardoai";
    readonly Fal: "fal";
    readonly Nvidia: "nvidia";
    readonly Jina: "jina";
    readonly Elevenlabs: "elevenlabs";
    readonly Litellm: "litellm";
    readonly Cerebras: "cerebras";
    readonly Openailike: "openailike";
    readonly Bytedance: "bytedance";
    readonly Mistral: "mistral";
    readonly Deepseek: "deepseek";
    readonly Contextualai: "contextualai";
    readonly Moonshotai: "moonshotai";
    readonly Zai: "zai";
    readonly Minimax: "minimax";
    readonly Alibaba: "alibaba";
    readonly Slack: "slack";
};
/**
 * The provider used to generate the response
 */
export type Provider = ClosedEnum<typeof Provider>;
/**
 * Metadata of the retrieved chunk from the knowledge base
 */
export type DeploymentInvokeMetadata = {
    /**
     * Name of the file
     */
    fileName: string;
    /**
     * Page number of the chunk
     */
    pageNumber: number | null;
    /**
     * Type of the file
     */
    fileType: string;
    /**
     * Rerank scores are normalized to be in the range [0, 1]. Scores close to 1 indicate a high relevance to the query, and scores closer to 0 indicate low relevance. It is not accurate to assume a score of 0.9 means the document is 2x more relevant than a document with a score of 0.45
     */
    rerankScore?: number | undefined;
    /**
     * Search scores are normalized to be in the range [0, 1]. Search score is calculated based on `[Cosine Similarity](https://en.wikipedia.org/wiki/Cosine_similarity)` algorithm. Scores close to 1 indicate the document is closer to the query, and scores closer to 0 indicate the document is farther from the query.
     */
    searchScore: number;
};
export type Retrievals = {
    /**
     * Content of the retrieved chunk from the knowledge base
     */
    document: string;
    /**
     * Metadata of the retrieved chunk from the knowledge base
     */
    metadata: DeploymentInvokeMetadata;
};
export type PromptTokensDetails = {
    cachedTokens?: number | null | undefined;
};
export type CompletionTokensDetails = {
    reasoningTokens?: number | null | undefined;
};
/**
 * Usage metrics for the response
 */
export type DeploymentInvokeUsage = {
    totalTokens?: number | undefined;
    promptTokens?: number | undefined;
    completionTokens?: number | undefined;
    promptTokensDetails?: PromptTokensDetails | undefined;
    completionTokensDetails?: CompletionTokensDetails | null | undefined;
};
/**
 * The role of the prompt message
 */
export declare const DeploymentInvokeMessageDeploymentsRole: {
    readonly System: "system";
    readonly Assistant: "assistant";
    readonly User: "user";
    readonly Exception: "exception";
    readonly Tool: "tool";
    readonly Prompt: "prompt";
    readonly Correction: "correction";
    readonly ExpectedOutput: "expected_output";
};
/**
 * The role of the prompt message
 */
export type DeploymentInvokeMessageDeploymentsRole = ClosedEnum<typeof DeploymentInvokeMessageDeploymentsRole>;
export type Message3 = {
    type: "image";
    /**
     * The role of the prompt message
     */
    role: DeploymentInvokeMessageDeploymentsRole;
    url: string;
};
/**
 * The role of the prompt message
 */
export declare const DeploymentInvokeMessageRole: {
    readonly System: "system";
    readonly Assistant: "assistant";
    readonly User: "user";
    readonly Exception: "exception";
    readonly Tool: "tool";
    readonly Prompt: "prompt";
    readonly Correction: "correction";
    readonly ExpectedOutput: "expected_output";
};
/**
 * The role of the prompt message
 */
export type DeploymentInvokeMessageRole = ClosedEnum<typeof DeploymentInvokeMessageRole>;
export type Message2 = {
    type: "content";
    /**
     * The role of the prompt message
     */
    role: DeploymentInvokeMessageRole;
    content: string | null;
    /**
     * Internal thought process of the model
     */
    reasoning?: string | undefined;
    /**
     * The signature holds a cryptographic token which verifies that the thinking block was generated by the model, and is verified when thinking is part of a multiturn conversation. This value should not be modified and should always be sent to the API when the reasoning is redacted. Currently only supported by `Anthropic`.
     */
    reasoningSignature?: string | undefined;
    /**
     * Occasionally the model's internal reasoning will be flagged by the safety systems of the provider. When this occurs, the provider will encrypt the reasoning. These redacted reasoning is decrypted when passed back to the API, allowing the model to continue its response without losing context.
     */
    redactedReasoning?: string | undefined;
};
/**
 * The role of the prompt message
 */
export declare const MessageRole: {
    readonly System: "system";
    readonly Assistant: "assistant";
    readonly User: "user";
    readonly Exception: "exception";
    readonly Tool: "tool";
    readonly Prompt: "prompt";
    readonly Correction: "correction";
    readonly ExpectedOutput: "expected_output";
};
/**
 * The role of the prompt message
 */
export type MessageRole = ClosedEnum<typeof MessageRole>;
export declare const DeploymentInvokeMessageDeploymentsResponseType: {
    readonly Function: "function";
};
export type DeploymentInvokeMessageDeploymentsResponseType = ClosedEnum<typeof DeploymentInvokeMessageDeploymentsResponseType>;
export type MessageFunction = {
    name: string;
    /**
     * JSON string arguments for the functions
     */
    arguments: string;
};
export type MessageToolCalls = {
    id?: string | undefined;
    index?: number | undefined;
    type: DeploymentInvokeMessageDeploymentsResponseType;
    function: MessageFunction;
};
export type Message1 = {
    type: "tool_calls";
    /**
     * The role of the prompt message
     */
    role: MessageRole;
    content?: string | null | undefined;
    toolCalls: Array<MessageToolCalls>;
    /**
     * Internal thought process of the model
     */
    reasoning?: string | undefined;
    /**
     * The signature holds a cryptographic token which verifies that the thinking block was generated by the model, and is verified when thinking is part of a multiturn conversation. This value should not be modified and should always be sent to the API when the reasoning is redacted. Currently only supported by `Anthropic`.
     */
    reasoningSignature?: string | undefined;
    /**
     * Occasionally the model's internal reasoning will be flagged by the safety systems of the provider. When this occurs, the provider will encrypt the reasoning. These redacted reasoning is decrypted when passed back to the API, allowing the model to continue its response without losing context.
     */
    redactedReasoning?: string | undefined;
};
export type Message = Message1 | Message2 | Message3;
export type DeploymentInvokeChoices = {
    index: number;
    message: Message1 | Message2 | Message3;
    finishReason?: string | null | undefined;
};
/**
 * Successful operation
 */
export type DeploymentInvokeResponseBody = {
    /**
     * A unique identifier for the response. Can be used to add metrics to the transaction.
     */
    id: string;
    /**
     * A timestamp indicating when the object was created. Usually in a standardized format like ISO 8601
     */
    created: Date;
    /**
     * Indicates the type of model used to generate the response
     */
    object: DeploymentInvokeObject;
    /**
     * The model used to generate the response
     */
    model: string;
    /**
     * The provider used to generate the response
     */
    provider: Provider;
    /**
     * Indicates if the response is the final response
     */
    isFinal: boolean;
    /**
     * Indicates integration id used to generate the response
     */
    integrationId?: string | undefined;
    /**
     * A timestamp indicating when the object was finalized. Usually in a standardized format like ISO 8601
     */
    finalized?: Date | undefined;
    /**
     * Provider backed system fingerprint.
     */
    systemFingerprint?: string | null | undefined;
    /**
     * List of documents retrieved from the knowledge base. This property is only available when the `include_retrievals` flag is set to `true` in the invoke settings. When stream is set to true, the `retrievals` property will be returned in the last streamed chunk where the property `is_final` is set to `true`.
     */
    retrievals?: Array<Retrievals> | undefined;
    /**
     * Response returned by the model provider. This functionality is only supported when streaming is not used. If streaming is used, the `provider_response` property will be set to `null`.
     */
    providerResponse?: any | undefined;
    /**
     * Usage metrics for the response
     */
    usage?: DeploymentInvokeUsage | null | undefined;
    /**
     * A list of choices generated by the model
     */
    choices: Array<DeploymentInvokeChoices>;
};
/** @internal */
export declare const DeploymentInvokeObject$inboundSchema: z.ZodNativeEnum<typeof DeploymentInvokeObject>;
/** @internal */
export declare const Provider$inboundSchema: z.ZodNativeEnum<typeof Provider>;
/** @internal */
export declare const DeploymentInvokeMetadata$inboundSchema: z.ZodType<DeploymentInvokeMetadata, z.ZodTypeDef, unknown>;
export declare function deploymentInvokeMetadataFromJSON(jsonString: string): SafeParseResult<DeploymentInvokeMetadata, SDKValidationError>;
/** @internal */
export declare const Retrievals$inboundSchema: z.ZodType<Retrievals, z.ZodTypeDef, unknown>;
export declare function retrievalsFromJSON(jsonString: string): SafeParseResult<Retrievals, SDKValidationError>;
/** @internal */
export declare const PromptTokensDetails$inboundSchema: z.ZodType<PromptTokensDetails, z.ZodTypeDef, unknown>;
export declare function promptTokensDetailsFromJSON(jsonString: string): SafeParseResult<PromptTokensDetails, SDKValidationError>;
/** @internal */
export declare const CompletionTokensDetails$inboundSchema: z.ZodType<CompletionTokensDetails, z.ZodTypeDef, unknown>;
export declare function completionTokensDetailsFromJSON(jsonString: string): SafeParseResult<CompletionTokensDetails, SDKValidationError>;
/** @internal */
export declare const DeploymentInvokeUsage$inboundSchema: z.ZodType<DeploymentInvokeUsage, z.ZodTypeDef, unknown>;
export declare function deploymentInvokeUsageFromJSON(jsonString: string): SafeParseResult<DeploymentInvokeUsage, SDKValidationError>;
/** @internal */
export declare const DeploymentInvokeMessageDeploymentsRole$inboundSchema: z.ZodNativeEnum<typeof DeploymentInvokeMessageDeploymentsRole>;
/** @internal */
export declare const Message3$inboundSchema: z.ZodType<Message3, z.ZodTypeDef, unknown>;
export declare function message3FromJSON(jsonString: string): SafeParseResult<Message3, SDKValidationError>;
/** @internal */
export declare const DeploymentInvokeMessageRole$inboundSchema: z.ZodNativeEnum<typeof DeploymentInvokeMessageRole>;
/** @internal */
export declare const Message2$inboundSchema: z.ZodType<Message2, z.ZodTypeDef, unknown>;
export declare function message2FromJSON(jsonString: string): SafeParseResult<Message2, SDKValidationError>;
/** @internal */
export declare const MessageRole$inboundSchema: z.ZodNativeEnum<typeof MessageRole>;
/** @internal */
export declare const DeploymentInvokeMessageDeploymentsResponseType$inboundSchema: z.ZodNativeEnum<typeof DeploymentInvokeMessageDeploymentsResponseType>;
/** @internal */
export declare const MessageFunction$inboundSchema: z.ZodType<MessageFunction, z.ZodTypeDef, unknown>;
export declare function messageFunctionFromJSON(jsonString: string): SafeParseResult<MessageFunction, SDKValidationError>;
/** @internal */
export declare const MessageToolCalls$inboundSchema: z.ZodType<MessageToolCalls, z.ZodTypeDef, unknown>;
export declare function messageToolCallsFromJSON(jsonString: string): SafeParseResult<MessageToolCalls, SDKValidationError>;
/** @internal */
export declare const Message1$inboundSchema: z.ZodType<Message1, z.ZodTypeDef, unknown>;
export declare function message1FromJSON(jsonString: string): SafeParseResult<Message1, SDKValidationError>;
/** @internal */
export declare const Message$inboundSchema: z.ZodType<Message, z.ZodTypeDef, unknown>;
export declare function messageFromJSON(jsonString: string): SafeParseResult<Message, SDKValidationError>;
/** @internal */
export declare const DeploymentInvokeChoices$inboundSchema: z.ZodType<DeploymentInvokeChoices, z.ZodTypeDef, unknown>;
export declare function deploymentInvokeChoicesFromJSON(jsonString: string): SafeParseResult<DeploymentInvokeChoices, SDKValidationError>;
/** @internal */
export declare const DeploymentInvokeResponseBody$inboundSchema: z.ZodType<DeploymentInvokeResponseBody, z.ZodTypeDef, unknown>;
export declare function deploymentInvokeResponseBodyFromJSON(jsonString: string): SafeParseResult<DeploymentInvokeResponseBody, SDKValidationError>;
//# sourceMappingURL=deploymentinvoke.d.ts.map