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

add new features for Conversation Runtime #33086

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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 @@ -399,6 +399,36 @@ model AnalyzeConversationTaskResult {
kind: AnalyzeConversationTaskResultsKind;
}

model ConversationalAITask extends AnalyzeConversationTask {
/** Task kind. */
kind: AnalyzeConversationTaskKind.ConversationalAI;

/** The input ConversationItem and its optional parameters */
analysisInput: ConversationalAIAnalysisOptions;

/** Input parameters necessary for a Conversation language understanding task. */
parameters: BaseConversationTaskParameters;
}

model ConversationalAIAnalysisOptions {
/** List of multiple conversations */
conversations: Conversation[];
}

model Conversations {
/** The ID of the conversation. */
id: string;

/** Default modality for all conversation items. */
modality: InputModality;

/** Default language for all conversation items in BCP 47 language representation. */
language: string;

/** List of conversation items. */
conversationItems: ConversationItemBase[];
}

/** The input for a conversation language understanding task. */
model ConversationalTask extends AnalyzeConversationTask {
/** Task kind. */
Expand All @@ -425,12 +455,9 @@ model ConversationItemBase {
/** The participant ID of a conversation item. */
participantId: string;

/** The override language of a conversation item in BCP 47 language representation. */
language?: string;

/** Enumeration of supported conversational modalities. */
modality?: InputModality;

/** The text input */
text: string;

/** Role of the participant. */
@added(Versions.v2023_04_01)
role?: role;
Expand All @@ -439,8 +466,12 @@ model ConversationItemBase {
/** The text modality of an input conversation. */
#suppress "@azure-tools/typespec-azure-core/bad-record-type"
model TextConversationItem is ConversationItemBase {
/** The text input */
text: string;
/** The override language of a conversation item in BCP 47 language representation. */
language?: string;

/** Enumeration of supported conversational modalities. */
modality?: InputModality;

}

/** This is the parameter set of either the Orchestration project itself or one of the target services. */
Expand Down Expand Up @@ -531,6 +562,18 @@ model ConversationPrediction extends BasePrediction {
entities: Array<ConversationEntity>;
}

/** Represents the prediction section of a Conversation project. */
model ConversationalAIPrediction extends BasePrediction {
/** Represents the prediction section of a Conversation project. */
projectKind: projectKind.ConversationalAI;

/** The intent classification results. */
intents: Array<ConversationIntent>;

/** The entity extraction results. */
entities: Array<ConversationEntity>;
}

/** The intent classification result of a Conversation project. */
model ConversationIntent {
/** A predicted class. */
Expand Down Expand Up @@ -958,9 +1001,6 @@ model TranscriptConversationItem is ConversationItemBase {
/** Inverse-text-normalized format with profanity masking applied. */
maskedItn: string;

/** Display form of the recognized text from the speech-to-text API, with punctuation and capitalization added. */
text: string;

/** Lexical form of the recognized text from the speech-to-text API, with the actual words recognized. */
lexical: string;

Expand Down Expand Up @@ -1044,30 +1084,112 @@ model ConversationRequestStatistics is RequestStatistics {
@added(Versions.v2023_04_01)
model ConversationItemLevelTiming is AudioTiming;

/** Input parameters necessary for a Conversation task. */
model ConversationTaskParameters {
model BaseConversationTaskParameters {
/** The name of the project to use. */
projectName: string;

/** The name of the deployment to use. */
deploymentName: string;

/** Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. */
stringIndexType?: StringIndexType = StringIndexType.TextElements_v8;
}

/** Input parameters necessary for a Conversation task. */
model ConversationTaskParameters is BaseConversationTaskParameters{

/** If true, the service will return more detailed information in the response. */
verbose?: boolean;

/** If true, the service will keep the query for further review. */
isLoggingEnabled?: boolean;

/** Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. */
stringIndexType?: StringIndexType = StringIndexType.TextElements_v8;

/** The name of a target project to forward the request to. */
directTarget?: string;

/** A dictionary representing the parameters for each target project. */
targetProjectParameters?: Record<AnalysisParameters>;
}

/** The results of a ConversationalAI task. */
model ConversationalAITaskResult extends AnalyzeConversationTaskResult {
/** The results of a Conversational AI task. */
kind: AnalyzeConversationTaskResultsKind.ConversationalAIResult;

/** Represents the conversational analysis response. */
result: ConversationalAIResult;
}

model ConversationalAIResult {
/** Multiple multi-turn conversations analyzed. */
conversations: ConversationalAIAnalysis[];

/** Any warnings encountered during processing. */
warnings?: string[];
}

model ConversationalAIAnalysis {
/** The ID of the conversation. */
id: string;

/** The intent classification results for this conversation. */
intents: Array<ConversationalAIIntent>;

/** Global entities that are matched but not associated with any specific intent. */
entities?: Array<ConversationalAIEntity>;
}

model ConversationalAIIntent {
/** The name of the detected intent. */
name: string;

/** The type of intent, either "action" or "question". */
type: string;

/** The ranges of conversation items where this intent was identified. */
conversationItemRanges: Array<ConversationItemRange>;

/** The entities associated with this intent. */
entities: Array<ConversationalAIEntity>;
}

model ConversationItemRange {
/** The starting index of the intent occurrence within the conversation. */
offset: int32;

/** The number of continuous conversation items for this intent. */
length: int32;
}

model ConversationalAIEntity {
/** The entity name or category. */
name: string;

/** The detected text of the entity. */
text: string;

/** The confidence score of the entity detection (0.0 to 1.0). */
confidenceScore: float32;

/** The starting index of the entity in the query. */
offset: int32;

/** The length of the detected entity text. */
length: int32;

/** The ID of the conversation item where the entity appears. */
conversationItemId: string;

/** The index of the conversation item where the entity appears. */
conversationItemIndex: int32;

/** Entity resolution details, if available. */
resolutions?: Array<BaseResolution>;

/** Additional entity metadata. */
extraInformation?: Array<BaseExtraInformation>;
}

/** The results of a Conversation task. */
model ConversationalTaskResult extends AnalyzeConversationTaskResult {
/** The results of a Conversation task. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ union AnalyzeConversationTaskKind {

/** Conversation task kind */
Conversation: "Conversation",

/** Conversation task kind */
ConversationalAI: "ConversationalAI",
}

/** Enumeration of supported conversational task results. */
Expand All @@ -27,6 +30,9 @@ union AnalyzeConversationTaskResultsKind {

/** Conversation result task kind */
ConversationResult: "ConversationResult",

/** Conversation result task kind */
ConversationalAIResult: "ConversationalAIResult",
}

/** The area unit of measurement. */
Expand Down Expand Up @@ -236,6 +242,9 @@ union projectKind {

/** Orchestration type */
Orchestration: "Orchestration",

/** Conversation type */
ConversationalAI: "ConversationalAI",
}

/** The kind of range that the resolution object represents. */
Expand Down
Loading