mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-13 08:33:48 +00:00
Added tool calling support (#731)
Co-authored-by: krut_ni <nils.kruthoff@dlr.de> Co-authored-by: Thorsten Sommer <SommerEngineering@users.noreply.github.com>
This commit is contained in:
266 files changed
+11186
-740
No files matched your search
@@ -0,0 +1,18 @@
|
||||
namespace AIStudio.Tools.Web;
|
||||
|
||||
/// <summary>
|
||||
/// The parts of a retrieved web page that a tool hands to a model.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Every field here left the page as free text, so every field can carry an injection: a title,
|
||||
/// an author name from a meta tag, and a publication date are all attacker-controlled on a page
|
||||
/// the model asked for. They are filtered together with the page content.
|
||||
/// </remarks>
|
||||
public sealed record WebPageModelContent(string Markdown, string Title, string Description, IReadOnlyList<string> Authors, string Language, string PublishedTime, string ModifiedTime)
|
||||
{
|
||||
/// <summary>
|
||||
/// Takes the model-facing fields of an extracted page, with the content the tool decided to
|
||||
/// return, which may be shorter than what was extracted.
|
||||
/// </summary>
|
||||
public static WebPageModelContent From(ExtractedWebPage page, string markdown) => new(markdown, page.Title, page.Description, page.Authors, page.Language, page.PublishedTime, page.ModifiedTime);
|
||||
}
|
||||
Reference in new issue
Block a user