Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refresh-openai-2024-02-15 #2283

Merged
merged 2 commits into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,21 @@ export interface AzureChatExtensionConfiguration {
}

// @public
export type AzureChatExtensionConfigurationUnion = AzureCognitiveSearchChatExtensionConfiguration | AzureMachineLearningIndexChatExtensionConfiguration | AzureCosmosDBChatExtensionConfiguration | ElasticsearchChatExtensionConfiguration | PineconeChatExtensionConfiguration | AzureChatExtensionConfiguration;
export type AzureChatExtensionConfigurationUnion = AzureSearchChatExtensionConfiguration | AzureMachineLearningIndexChatExtensionConfiguration | AzureCosmosDBChatExtensionConfiguration | ElasticsearchChatExtensionConfiguration | PineconeChatExtensionConfiguration | AzureChatExtensionConfiguration;

// @public
export interface AzureChatExtensionDataSourceResponseCitation {
chunkId?: string;
content: string;
filepath?: string;
title?: string;
url?: string;
}

// @public
export interface AzureChatExtensionsMessageContext {
messages?: ChatResponseMessage[];
citations?: AzureChatExtensionDataSourceResponseCitation[];
intent?: string;
}

// @public
Expand All @@ -124,57 +134,18 @@ export interface AzureChatOCREnhancementConfiguration {
enabled: boolean;
}

// @public
export interface AzureCognitiveSearchChatExtensionConfiguration extends AzureChatExtensionConfiguration {
parameters: AzureCognitiveSearchChatExtensionParameters;
type: "AzureCognitiveSearch";
}

// @public
export interface AzureCognitiveSearchChatExtensionParameters {
authentication?: OnYourDataAuthenticationOptionsUnion;
embeddingDependency?: OnYourDataVectorizationSourceUnion;
embeddingEndpoint?: string;
embeddingKey?: string;
endpoint: string;
fieldsMapping?: AzureCognitiveSearchIndexFieldMappingOptions;
filter?: string;
indexName: string;
inScope?: boolean;
key?: string;
queryType?: AzureCognitiveSearchQueryType;
roleInformation?: string;
semanticConfiguration?: string;
strictness?: number;
topNDocuments?: number;
}

// @public
export interface AzureCognitiveSearchIndexFieldMappingOptions {
contentFields?: string[];
contentFieldsSeparator?: string;
filepathField?: string;
imageVectorFields?: string[];
titleField?: string;
urlField?: string;
vectorFields?: string[];
}

// @public
export type AzureCognitiveSearchQueryType = string;

// @public
export interface AzureCosmosDBChatExtensionConfiguration extends AzureChatExtensionConfiguration {
parameters: AzureCosmosDBChatExtensionParameters;
type: "AzureCosmosDB";
type: "azure_cosmos_db";
}

// @public
export interface AzureCosmosDBChatExtensionParameters {
authentication?: OnYourDataAuthenticationOptionsUnion;
containerName: string;
databaseName: string;
embeddingDependency?: OnYourDataVectorizationSourceUnion;
embeddingDependency: OnYourDataVectorizationSourceUnion;
fieldsMapping: AzureCosmosDBFieldMappingOptions;
indexName: string;
inScope?: boolean;
Expand All @@ -185,6 +156,11 @@ export interface AzureCosmosDBChatExtensionParameters {

// @public
export interface AzureCosmosDBFieldMappingOptions {
contentFields: string[];
contentFieldsSeparator?: string;
filepathField?: string;
titleField?: string;
urlField?: string;
vectorFields: string[];
}

Expand Down Expand Up @@ -216,7 +192,7 @@ export interface AzureGroundingEnhancementLineSpan {
// @public
export interface AzureMachineLearningIndexChatExtensionConfiguration extends AzureChatExtensionConfiguration {
parameters: AzureMachineLearningIndexChatExtensionParameters;
type: "AzureMLIndex";
type: "azure_ml_index";
}

// @public
Expand All @@ -232,6 +208,42 @@ export interface AzureMachineLearningIndexChatExtensionParameters {
version: string;
}

// @public
export interface AzureSearchChatExtensionConfiguration extends AzureChatExtensionConfiguration {
parameters: AzureSearchChatExtensionParameters;
type: "azure_search";
}

// @public
export interface AzureSearchChatExtensionParameters {
authentication?: OnYourDataAuthenticationOptionsUnion;
embeddingDependency?: OnYourDataVectorizationSourceUnion;
endpoint: string;
fieldsMapping?: AzureSearchIndexFieldMappingOptions;
filter?: string;
indexName: string;
inScope?: boolean;
queryType?: AzureSearchQueryType;
roleInformation?: string;
semanticConfiguration?: string;
strictness?: number;
topNDocuments?: number;
}

// @public
export interface AzureSearchIndexFieldMappingOptions {
contentFields?: string[];
contentFieldsSeparator?: string;
filepathField?: string;
imageVectorFields?: string[];
titleField?: string;
urlField?: string;
vectorFields?: string[];
}

// @public
export type AzureSearchQueryType = string;

// @public
export interface ChatChoice {
contentFilterResults?: ContentFilterResultsForChoice;
Expand All @@ -240,9 +252,20 @@ export interface ChatChoice {
finishDetails?: ChatFinishDetailsUnion;
finishReason: CompletionsFinishReason | null;
index: number;
logprobs: ChatChoiceLogProbabilityInfo | null;
message?: ChatResponseMessage;
}

// @public
export interface ChatChoiceLogProbabilityInfo {
content: ChatTokenLogProbabilityResult[] | null;
}

// @public
export interface ChatChoiceLogProbabilityInfo {
content: ChatTokenLogProbabilityResult[] | null;
}

// @public
export interface ChatCompletions {
choices: ChatChoice[];
Expand All @@ -265,14 +288,19 @@ export interface ChatCompletionsFunctionToolDefinition extends ChatCompletionsTo
type: "function";
}

// @public
export interface ChatCompletionsFunctionToolSelection {
name: string;
}

// @public
export interface ChatCompletionsJsonResponseFormat extends ChatCompletionsResponseFormat {
type: "json_object";
}

// @public
export interface ChatCompletionsNamedFunctionToolSelection extends ChatCompletionsNamedToolSelection {
name: string;
function: ChatCompletionsFunctionToolSelection;
type: "function";
}

Expand All @@ -292,6 +320,7 @@ export interface ChatCompletionsOptions {
functionCall?: FunctionCallPreset | FunctionName;
functions?: FunctionDefinition[];
logitBias?: Record<string, number>;
logprobs?: boolean | null;
maxTokens?: number;
messages: ChatRequestMessageUnion[];
model?: string;
Expand All @@ -304,6 +333,7 @@ export interface ChatCompletionsOptions {
temperature?: number;
toolChoice?: ChatCompletionsToolSelectionPreset | ChatCompletionsNamedToolSelectionUnion;
tools?: ChatCompletionsToolDefinitionUnion[];
topLogprobs?: number | null;
topP?: number;
user?: string;
}
Expand Down Expand Up @@ -435,6 +465,21 @@ export interface ChatResponseMessage {
// @public
export type ChatRole = string;

// @public
export interface ChatTokenLogProbabilityInfo {
bytes: number[] | null;
logprob: number;
token: string;
}

// @public
export interface ChatTokenLogProbabilityResult {
bytes: number[] | null;
logprob: number;
token: string;
topLogprobs: ChatTokenLogProbabilityInfo[] | null;
}

// @public
export interface Choice {
contentFilterResults?: ContentFilterResultsForChoice;
Expand Down Expand Up @@ -561,7 +606,7 @@ export type ContentFilterSeverity = string;
// @public
export interface ElasticsearchChatExtensionConfiguration extends AzureChatExtensionConfiguration {
parameters: ElasticsearchChatExtensionParameters;
type: "Elasticsearch";
type: "elasticsearch";
}

// @public
Expand Down Expand Up @@ -606,6 +651,7 @@ export interface Embeddings {
// @public
export interface EmbeddingsOptions {
input: string[];
inputType: string;
model?: string;
user?: string;
}
Expand Down Expand Up @@ -659,10 +705,6 @@ export interface GetAudioTranslationAsResponseObjectOptions extends OperationOpt
export interface GetChatCompletionsOptions extends OperationOptions {
}

// @public (undocumented)
export interface GetChatCompletionsWithAzureExtensionsOptions extends OperationOptions {
}

// @public (undocumented)
export interface GetCompletionsOptions extends OperationOptions {
}
Expand Down Expand Up @@ -717,10 +759,16 @@ export interface MaxTokensFinishDetails extends ChatFinishDetails {
type: "max_tokens";
}

// @public
export interface OnYourDataAccessTokenAuthenticationOptions extends OnYourDataAuthenticationOptions {
accessToken: string;
type: "access_token";
}

// @public
export interface OnYourDataApiKeyAuthenticationOptions extends OnYourDataAuthenticationOptions {
key: string;
type: "APIKey";
type: "api_key";
}

// @public
Expand All @@ -729,52 +777,58 @@ export interface OnYourDataAuthenticationOptions {
}

// @public
export type OnYourDataAuthenticationOptionsUnion = OnYourDataApiKeyAuthenticationOptions | OnYourDataConnectionStringAuthenticationOptions | OnYourDataKeyAndKeyIdAuthenticationOptions | OnYourDataSystemAssignedManagedIdentityAuthenticationOptions | OnYourDataUserAssignedManagedIdentityAuthenticationOptions | OnYourDataAuthenticationOptions;
export type OnYourDataAuthenticationOptionsUnion = OnYourDataApiKeyAuthenticationOptions | OnYourDataConnectionStringAuthenticationOptions | OnYourDataKeyAndKeyIdAuthenticationOptions | OnYourDataEncodedApiKeyAuthenticationOptions | OnYourDataAccessTokenAuthenticationOptions | OnYourDataSystemAssignedManagedIdentityAuthenticationOptions | OnYourDataUserAssignedManagedIdentityAuthenticationOptions | OnYourDataAuthenticationOptions;

// @public
export type OnYourDataAuthenticationType = string;

// @public
export interface OnYourDataConnectionStringAuthenticationOptions extends OnYourDataAuthenticationOptions {
connectionString: string;
type: "ConnectionString";
type: "connection_string";
}

// @public
export interface OnYourDataDeploymentNameVectorizationSource extends OnYourDataVectorizationSource {
deploymentName: string;
type: "DeploymentName";
type: "deployment_name";
}

// @public
export interface OnYourDataEncodedApiKeyAuthenticationOptions extends OnYourDataAuthenticationOptions {
encodedApiKey: string;
type: "encoded_api_key";
}

// @public
export interface OnYourDataEndpointVectorizationSource extends OnYourDataVectorizationSource {
authentication: OnYourDataAuthenticationOptionsUnion;
endpoint: string;
type: "Endpoint";
type: "endpoint";
}

// @public
export interface OnYourDataKeyAndKeyIdAuthenticationOptions extends OnYourDataAuthenticationOptions {
key: string;
keyId: string;
type: "KeyAndKeyId";
type: "key_and_key_id";
}

// @public
export interface OnYourDataModelIdVectorizationSource extends OnYourDataVectorizationSource {
modelId: string;
type: "ModelId";
type: "model_id";
}

// @public
export interface OnYourDataSystemAssignedManagedIdentityAuthenticationOptions extends OnYourDataAuthenticationOptions {
type: "SystemAssignedManagedIdentity";
type: "system_assigned_managed_identity";
}

// @public
export interface OnYourDataUserAssignedManagedIdentityAuthenticationOptions extends OnYourDataAuthenticationOptions {
managedIdentityResourceId: string;
type: "UserAssignedManagedIdentity";
type: "user_assigned_managed_identity";
}

// @public
Expand All @@ -796,7 +850,6 @@ export class OpenAIClient {
getAudioTranslationAsPlainText(deploymentId: string, body: AudioTranslationOptions, options?: GetAudioTranslationAsPlainTextOptions): Promise<string>;
getAudioTranslationAsResponseObject(deploymentId: string, body: AudioTranslationOptions, options?: GetAudioTranslationAsResponseObjectOptions): Promise<AudioTranslation>;
getChatCompletions(deploymentId: string, body: ChatCompletionsOptions, options?: GetChatCompletionsOptions): Promise<ChatCompletions>;
getChatCompletionsWithAzureExtensions(deploymentId: string, body: ChatCompletionsOptions, options?: GetChatCompletionsWithAzureExtensionsOptions): Promise<ChatCompletions>;
getCompletions(deploymentId: string, body: CompletionsOptions, options?: GetCompletionsOptions): Promise<Completions>;
getEmbeddings(deploymentId: string, body: EmbeddingsOptions, options?: GetEmbeddingsOptions): Promise<Embeddings>;
getImageGenerations(deploymentId: string, body: ImageGenerationOptions, options?: GetImageGenerationsOptions): Promise<ImageGenerations>;
Expand All @@ -816,7 +869,7 @@ export interface PineconeChatExtensionConfiguration extends AzureChatExtensionCo
// @public
export interface PineconeChatExtensionParameters {
authentication?: OnYourDataAuthenticationOptionsUnion;
embeddingDependency?: OnYourDataVectorizationSourceUnion;
embeddingDependency: OnYourDataVectorizationSourceUnion;
environment: string;
fieldsMapping: PineconeFieldMappingOptions;
indexName: string;
Expand All @@ -828,13 +881,11 @@ export interface PineconeChatExtensionParameters {

// @public
export interface PineconeFieldMappingOptions {
contentFields?: string[];
contentFields: string[];
contentFieldsSeparator?: string;
filepathField?: string;
imageVectorFields?: string[];
titleField?: string;
urlField?: string;
vectorFields?: string[];
}

// @public
Expand Down
Loading
Loading