UNPKG

@azure/openai

Version:
117 lines 6.25 kB
import type { Completion, CompletionCreateParamsNonStreaming, CompletionCreateParamsStreaming, ChatCompletionCreateParamsNonStreaming, ChatCompletionCreateParamsStreaming, ChatCompletion, ChatCompletionChunk, ChatCompletionMessage } from "openai/resources/index"; import type { ContentFilterResultsForPromptOutput, ContentFilterResultsForChoiceOutput, AzureChatExtensionsMessageContextOutput, ImageGenerationPromptFilterResults, ImageGenerationContentFilterResults } from "./outputModels.js"; import type { AzureChatExtensionConfiguration } from "./models.js"; declare module "openai/resources/index" { interface Completion { /** * Content filtering results for zero or more prompts in the request. In a streaming request, * results for different prompts may arrive at different times or in different orders. */ prompt_filter_results?: Array<ContentFilterResultsForPromptOutput>; } interface ChatCompletionCreateParamsNonStreaming { /** * The configuration entries for Azure OpenAI chat extensions that use them. * This additional specification is only compatible with Azure OpenAI. */ data_sources?: Array<AzureChatExtensionConfiguration>; } interface ChatCompletionCreateParamsStreaming { /** * The configuration entries for Azure OpenAI chat extensions that use them. * This additional specification is only compatible with Azure OpenAI. */ data_sources?: Array<AzureChatExtensionConfiguration>; } interface ChatCompletion { /** * Content filtering results for zero or more prompts in the request. In a streaming request, * results for different prompts may arrive at different times or in different orders. */ prompt_filter_results?: Array<ContentFilterResultsForPromptOutput>; } interface ChatCompletionMessage { /** * If Azure OpenAI chat extensions are configured, this array represents the incremental steps performed by those * extensions while processing the chat completions request. */ context?: AzureChatExtensionsMessageContextOutput; } interface CompletionChoice { /** * Information about the content filtering category (hate, sexual, violence, self_harm), if it * has been detected, as well as the severity level (very_low, low, medium, high-scale that * determines the intensity and risk level of harmful content) and if it has been filtered or not. */ content_filter_results?: ContentFilterResultsForChoiceOutput; } namespace ChatCompletion { interface Choice { /** * Information about the content filtering category (hate, sexual, violence, self_harm), if it * has been detected, as well as the severity level (very_low, low, medium, high-scale that * determines the intensity and risk level of harmful content) and if it has been filtered or not. */ content_filter_results?: ContentFilterResultsForChoiceOutput; } } interface ChatCompletionChunk { /** * Content filtering results for zero or more prompts in the request. In a streaming request, * results for different prompts may arrive at different times or in different orders. */ prompt_filter_results?: Array<ContentFilterResultsForPromptOutput>; } namespace ChatCompletionChunk { interface Choice { /** * Information about the content filtering category (hate, sexual, violence, self_harm), if it * has been detected, as well as the severity level (very_low, low, medium, high-scale that * determines the intensity and risk level of harmful content) and if it has been filtered or not. */ content_filter_results?: ContentFilterResultsForChoiceOutput; } namespace Choice { /** * A chat completion delta generated by streamed model responses. */ interface Delta { /** * If Azure OpenAI chat extensions are configured, this array represents the incremental steps performed by those * extensions while processing the chat completions request. */ context?: AzureChatExtensionsMessageContextOutput; } } } interface ImagesResponse { /** * Information about the content filtering category (hate, sexual, violence, self_harm), if * it has been detected, as well as the severity level (very_low, low, medium, high-scale * that determines the intensity and risk level of harmful content) and if it has been * filtered or not. Information about jailbreak content and profanity, if it has been detected, * and if it has been filtered or not. And information about customer block list, if it has * been filtered and its id. */ content_filter_results?: ImageGenerationContentFilterResults; /** * Information about the content filtering category (hate, sexual, violence, self_harm), if * it has been detected, as well as the severity level (very_low, low, medium, high-scale * that determines the intensity and risk level of harmful content) and if it has been * filtered or not. Information about jailbreak content and profanity, if it has been detected, * and if it has been filtered or not. And information about customer block list, if it has * been filtered and its id. */ prompt_filter_results?: ImageGenerationPromptFilterResults; } interface UploadPart { /** * Azure-only field. */ azure_block_id?: string; } } export { Completion, CompletionCreateParamsNonStreaming, CompletionCreateParamsStreaming, ChatCompletionCreateParamsNonStreaming, ChatCompletionCreateParamsStreaming, ChatCompletion, ChatCompletionChunk, ChatCompletionMessage, }; export * from "./outputModels.js"; export * from "./models.js"; //# sourceMappingURL=index.d.ts.map