Added the research on individual participants to the BeyondFacts Lab (#1207)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-11-15 15:39:34 +01:00
1 parent 3ca4b3878b
commit 92d0ff68f4
69 files changed
+3869 -186

No files matched your search

+9
View File
@@ -836,6 +836,9 @@ public static class AppIcons
/// <summary>Stands for a group of people, such as the authors of a plugin or individual contributors.</summary>
public const string PEOPLE = LucideIcons.USERS;
/// <summary>Marks the research on single people on the web, such as the other participants of an event.</summary>
public const string PERSON_RESEARCH = LucideIcons.USER_SEARCH;
/// <summary>Stands for a picture library, a folder of pictures to choose from.</summary>
public const string PICTURE_LIBRARY = LucideIcons.IMAGES;
@@ -950,6 +953,9 @@ public static class AppIcons
/// <summary>Reports that an item replaced another one, such as a newly selected prompt guide file.</summary>
public const string REPLACE = LucideIcons.ARROW_LEFT_RIGHT;
/// <summary>Marks a research which stopped before all of its stages were done.</summary>
public const string RESEARCH_INCOMPLETE = LucideIcons.CIRCLE_DOT_DASHED;
/// <summary>Resets something to its start, such as an assistant's inputs, a conversation, or a history.</summary>
public const string RESET = LucideIcons.ROTATE_CCW;
@@ -1037,6 +1043,9 @@ public static class AppIcons
/// <summary>Warns about a possible security risk, such as suspected prompt injections or an assistant plugin that needs an audit.</summary>
public const string SECURITY_WARNING = LucideIcons.SHIELD_EXCLAMATION_POINT;
/// <summary>Lets the AI suggest a selection which the user checks, such as whom of a long list to research.</summary>
public const string SELECTION_SUGGESTION = LucideIcons.WAND_SPARKLES;
/// <summary>Stands for the semantic search tool, which searches the data sources by meaning.</summary>
public const string SEMANTIC_SEARCH = LucideIcons.TEXT_SEARCH;
@@ -17,9 +17,6 @@ namespace AIStudio.Tools.ToolCallingSystem.Harness;
/// </remarks>
public sealed class ToolCallingLoop(ILogger<ToolCallingLoop> logger) : IToolCallingLoop
{
private const string NO_ANSWER_AFTER_TOOL_CALL = "The model completed the tool call but did not return a final answer.";
private const string NO_ANSWER_AFTER_LIMIT = "The model did not return a final answer after completing the available tool calls.";
/// <summary>
/// What separates the text of one round from the text of the next one.
/// </summary>
@@ -152,7 +149,7 @@ public sealed class ToolCallingLoop(ILogger<ToolCallingLoop> logger) : IToolCall
// the tools contributed. An empty chunk is how sources travel on their own; the
// streaming paths of the providers attach their annotations the same way.
//
yield return WithWhatTheToolsContributed(roundAnswered ? string.Empty : NO_ANSWER_AFTER_LIMIT);
yield return roundAnswered ? WithWhatTheToolsContributed(string.Empty) : WithoutAnswer(ToolCallingMessages.NoAnswerAfterLimit);
yield break;
}
@@ -167,7 +164,7 @@ public sealed class ToolCallingLoop(ILogger<ToolCallingLoop> logger) : IToolCall
if (toolCallCount > 0)
{
yield return WithWhatTheToolsContributed(NO_ANSWER_AFTER_TOOL_CALL);
yield return WithoutAnswer(ToolCallingMessages.NoAnswerAfterToolCall);
yield break;
}
@@ -264,6 +261,12 @@ public sealed class ToolCallingLoop(ILogger<ToolCallingLoop> logger) : IToolCall
// ends, so none of them hands over the sources and forgets the passages.
//
ContentStreamChunk WithWhatTheToolsContributed(string content) => new(content, [..toolSources]) { Passages = [..toolPassages] };
//
// A notice in place of the answer is marked as such, so that whoever stores the answer as a result can tell
// the two apart without reading the text:
//
ContentStreamChunk WithoutAnswer(string notice) => WithWhatTheToolsContributed(notice) with { EndsWithoutAnswer = true };
}
private static string GetDisplayName(ToolCallingLoopContext context, string toolName) => context.RunnableTools
@@ -14,6 +14,18 @@ public static class ToolCallingMessages
{
private static string TA(string fallbackEN) => I18N.I.TA(fallbackEN, typeof(ToolCallingMessages).Namespace, nameof(ToolCallingMessages));
private static string TB(string fallbackEN) => I18N.I.T(fallbackEN, typeof(ToolCallingMessages).Namespace, nameof(ToolCallingMessages));
/// <summary>
/// Says in place of the answer that the model stayed silent after a tool call.
/// </summary>
public static string NoAnswerAfterToolCall => TB("The model completed the tool call but did not return a final answer.");
/// <summary>
/// Says in place of the answer that the model stayed silent after it used up its tool calls.
/// </summary>
public static string NoAnswerAfterLimit => TB("The model did not return a final answer after completing the available tool calls.");
/// <summary>
/// Builds the exception for a response that cannot be used to continue.
/// </summary>