-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable Summarization in Ingestion Client (#1777)
* su * imp * arm * test * role * role * config * fix new line * len limit * fix typo * Update log to trigger build * remove BOM Co-authored-by: Yuantao Wang <[email protected]> Co-authored-by: Henry van der Vegte <[email protected]>
- Loading branch information
1 parent
ea5dbbd
commit 4c62a54
Showing
21 changed files
with
557 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
samples/ingestion/ingestion-client/Connector/Serializable/Conversations/Aspect.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// <copyright file="Aspect.cs" company="Microsoft Corporation"> | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE.md file in the project root for full license information. | ||
// </copyright> | ||
|
||
namespace Connector.Serializable.Language.Conversations | ||
{ | ||
using System.Text.Json.Serialization; | ||
|
||
[JsonConverter(typeof(JsonStringEnumConverter))] | ||
public enum Aspect | ||
{ | ||
None = 0, | ||
Issue = 1, | ||
Resolution = 2, | ||
ChapterTitle = 3, | ||
Narrative = 4, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
...ingestion-client/Connector/Serializable/Conversations/ConversationSummarizationOptions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// <copyright file="ConversationSummarizationOptions.cs" company="Microsoft Corporation"> | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE.md file in the project root for full license information. | ||
// </copyright> | ||
|
||
namespace Connector.Serializable.Language.Conversations | ||
{ | ||
using System.Collections.Generic; | ||
|
||
public class ConversationSummarizationOptions | ||
{ | ||
public bool Enabled { get; init; } | ||
|
||
public int InputLengthLimit { get; init; } | ||
|
||
public RoleAssignmentStratergy Stratergy { get; init; } | ||
|
||
public IEnumerable<Aspect> Aspects { get; init; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
...ingestion/ingestion-client/Connector/Serializable/Conversations/ItemizedSummaryContext.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// <copyright file="ItemizedSummaryContext.cs" company="Microsoft Corporation"> | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE.md file in the project root for full license information. | ||
// </copyright> | ||
|
||
namespace Connector | ||
{ | ||
using Newtonsoft.Json; | ||
|
||
public class ItemizedSummaryContext | ||
{ | ||
[JsonProperty(PropertyName = "conversationItemId")] | ||
public string ConversationItemId { get; set; } | ||
|
||
[JsonProperty(PropertyName = "offset")] | ||
public int Offset { get; set; } | ||
|
||
[JsonProperty(PropertyName = "length")] | ||
public int Length { get; set; } | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
samples/ingestion/ingestion-client/Connector/Serializable/Conversations/Role.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// <copyright file="Role.cs" company="Microsoft Corporation"> | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE.md file in the project root for full license information. | ||
// </copyright> | ||
|
||
namespace Connector.Serializable.Language.Conversations | ||
{ | ||
using System.Text.Json.Serialization; | ||
|
||
[JsonConverter(typeof(JsonStringEnumConverter))] | ||
public enum Role | ||
{ | ||
None = 0, | ||
Agent = 1, | ||
Customer = 2, | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
...gestion/ingestion-client/Connector/Serializable/Conversations/RoleAssignmentMappingKey.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// <copyright file="RoleAssignmentMappingKey.cs" company="Microsoft Corporation"> | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE.md file in the project root for full license information. | ||
// </copyright> | ||
|
||
namespace Connector.Serializable.Language.Conversations | ||
{ | ||
using System.Text.Json.Serialization; | ||
|
||
[JsonConverter(typeof(JsonStringEnumConverter))] | ||
public enum RoleAssignmentMappingKey | ||
{ | ||
None = 0, | ||
Channel = 1, | ||
Speaker = 2, | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
...ngestion/ingestion-client/Connector/Serializable/Conversations/RoleAssignmentStratergy.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// <copyright file="RoleAssignmentStratergy.cs" company="Microsoft Corporation"> | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE.md file in the project root for full license information. | ||
// </copyright> | ||
|
||
namespace Connector.Serializable.Language.Conversations | ||
{ | ||
using System.Collections.Generic; | ||
|
||
public class RoleAssignmentStratergy | ||
{ | ||
public RoleAssignmentMappingKey Key { get; init; } | ||
|
||
public Dictionary<int, Role> Mapping { get; init; } | ||
|
||
public Role FallbackRole { get; init; } | ||
} | ||
} |
25 changes: 0 additions & 25 deletions
25
samples/ingestion/ingestion-client/Connector/Serializable/Conversations/Summary.cs
This file was deleted.
Oops, something went wrong.
23 changes: 23 additions & 0 deletions
23
...ngestion/ingestion-client/Connector/Serializable/TranscriptionResult/SummaryResultItem.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// <copyright file="SummaryResultItem.cs" company="Microsoft Corporation"> | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE.md file in the project root for full license information. | ||
// </copyright> | ||
|
||
namespace Connector | ||
{ | ||
using System.Collections.Generic; | ||
|
||
using Newtonsoft.Json; | ||
|
||
public class SummaryResultItem | ||
{ | ||
[JsonProperty("aspect")] | ||
public string Aspect { get; set; } | ||
|
||
[JsonProperty("text")] | ||
public string Text { get; set; } | ||
|
||
[JsonProperty("contexts")] | ||
public IEnumerable<ItemizedSummaryContext> Contexts { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.