diff --git a/dotnet/packages/Microsoft.TeamsAI/Microsoft.TeamsAI/AI/Action/AIEntity.cs b/dotnet/packages/Microsoft.TeamsAI/Microsoft.TeamsAI/AI/Action/AIEntity.cs index 0976cb1c0..e0280b45b 100644 --- a/dotnet/packages/Microsoft.TeamsAI/Microsoft.TeamsAI/AI/Action/AIEntity.cs +++ b/dotnet/packages/Microsoft.TeamsAI/Microsoft.TeamsAI/AI/Action/AIEntity.cs @@ -100,7 +100,7 @@ public class ClientCitationAppearance public string? Url { get; set; } /// - /// Content of the citation. Should be clipped if longer than ~500 characters. + /// Content of the citation. Must be clipped if longer than 480 characters. /// [JsonProperty(PropertyName = "abstract")] public string Abstract { get; set; } = string.Empty; diff --git a/dotnet/packages/Microsoft.TeamsAI/Microsoft.TeamsAI/AI/Action/DefaultActions.cs b/dotnet/packages/Microsoft.TeamsAI/Microsoft.TeamsAI/AI/Action/DefaultActions.cs index 903dc14d6..ae3e243e6 100644 --- a/dotnet/packages/Microsoft.TeamsAI/Microsoft.TeamsAI/AI/Action/DefaultActions.cs +++ b/dotnet/packages/Microsoft.TeamsAI/Microsoft.TeamsAI/AI/Action/DefaultActions.cs @@ -105,7 +105,7 @@ public async Task SayCommandAsync([ActionTurnContext] ITurnContext turnC int i = 0; foreach (Citation citation in command.Response.Context.Citations) { - string abs = CitationUtils.Snippet(citation.Content, 500); + string abs = CitationUtils.Snippet(citation.Content, 480); if (isTeamsChannel) { content.Replace("\n", "
"); diff --git a/js/packages/teams-ai/src/actions/SayCommand.ts b/js/packages/teams-ai/src/actions/SayCommand.ts index 106c174ac..0f9586d30 100644 --- a/js/packages/teams-ai/src/actions/SayCommand.ts +++ b/js/packages/teams-ai/src/actions/SayCommand.ts @@ -75,7 +75,7 @@ export interface ClientCitation { url?: string; /** - * Content of the citation. Should be clipped if longer than ~500 characters. + * Content of the citation. Must be clipped if longer than 480 characters. */ abstract: string; @@ -179,7 +179,7 @@ export function sayCommand(feedbackLoopEna appearance: { '@type': 'DigitalDocument', name: citation.title || `Document #${i + 1}`, - abstract: Utilities.snippet(citation.content, 500) + abstract: Utilities.snippet(citation.content, 480) } }; diff --git a/python/packages/ai/teams/ai/ai.py b/python/packages/ai/teams/ai/ai.py index 53b4f632f..e108a01fe 100644 --- a/python/packages/ai/teams/ai/ai.py +++ b/python/packages/ai/teams/ai/ai.py @@ -304,7 +304,7 @@ async def _on_say_command( position=f"{i + 1}", appearance=Appearance( name=citation.title or f"Document {i + 1}", - abstract=snippet(citation.content, 500), + abstract=snippet(citation.content, 480), ), ) ) diff --git a/python/packages/ai/teams/ai/citations/citations.py b/python/packages/ai/teams/ai/citations/citations.py index 1fb19dc6d..5011f8325 100644 --- a/python/packages/ai/teams/ai/citations/citations.py +++ b/python/packages/ai/teams/ai/citations/citations.py @@ -64,7 +64,7 @@ class Appearance(Model): name (str): The name of the document text (str): Optional; ignored in Teams url (str): The url of the document - abstract (str): Content of the citation. Should be clipped if longer than ~500 characters + abstract (str): Content of the citation. Must be clipped if longer than 480 characters encodingFormat (str): The encoding format of the citation image (str): Used for icon; for not it is ignored keywords (list[str]): The optional keywords to the citation