mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-05 07:07:21 +00:00
Outbound data restrictions after searching data sources (#1106)
This commit is contained in:
1 parent
7ba5f01388
commit
8c5cfa78b6
61 files changed
+1389
-143
No files matched your search
@@ -9,10 +9,30 @@ public static class OutboundDataRestrictionExtensions
|
||||
/// <summary>
|
||||
/// The stricter of two restrictions.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// A restriction this version does not know counts as the strictest one, see OrStrictestWhenUnknown.
|
||||
/// </remarks>
|
||||
/// <param name="restriction">The one restriction.</param>
|
||||
/// <param name="other">The other restriction.</param>
|
||||
/// <returns>The restriction which allows less.</returns>
|
||||
public static OutboundDataRestriction StricterOf(this OutboundDataRestriction restriction, OutboundDataRestriction other) => other < restriction ? other : restriction;
|
||||
public static OutboundDataRestriction StricterOf(this OutboundDataRestriction restriction, OutboundDataRestriction other)
|
||||
{
|
||||
var knownRestriction = restriction.OrStrictestWhenUnknown();
|
||||
var knownOther = other.OrStrictestWhenUnknown();
|
||||
return knownOther < knownRestriction ? knownOther : knownRestriction;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The restriction as this version applies it.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The settings file and a saved chat may hold a number which names no member, e.g., one written
|
||||
/// by hand, and the settings read it all the same. Compared as it is, such a number would rank
|
||||
/// above UNRESTRICTED and lift every restriction it meets.
|
||||
/// </remarks>
|
||||
/// <param name="restriction">The restriction as it was read.</param>
|
||||
/// <returns>The restriction itself, or the strictest one when this version does not know it.</returns>
|
||||
public static OutboundDataRestriction OrStrictestWhenUnknown(this OutboundDataRestriction restriction) => Enum.IsDefined(restriction) ? restriction : OutboundDataRestriction.ONLY_CONFIGURED_SERVICES;
|
||||
|
||||
public static string GetName(this OutboundDataRestriction restriction) => restriction switch
|
||||
{
|
||||
@@ -28,9 +48,9 @@ public static class OutboundDataRestrictionExtensions
|
||||
/// </summary>
|
||||
public static string GetDescription(this OutboundDataRestriction restriction) => restriction switch
|
||||
{
|
||||
OutboundDataRestriction.ONLY_CONFIGURED_SERVICES => TB("The chat may only use services configured in AI Studio: your mailboxes, your Confluence wiki, and the allowed private hosts of the tool 'Read Web Page'. It reads no other web pages, and it does not search the web."),
|
||||
OutboundDataRestriction.ONLY_CONFIGURED_SERVICES => TB("The chat may only use services configured in AI Studio: your mailboxes, your data sources, your Confluence wiki, and the allowed private hosts of the tool 'Read Web Page'. It reads no other web pages, and it does not search the web."),
|
||||
OutboundDataRestriction.ONLY_LINKS_FROM_CHAT => TB("The chat may also read web pages whose addresses stand in the chat, written by you or returned by a tool, exactly as they stand there. It does not search the web, and the AI cannot choose addresses of its own outside the services configured in AI Studio."),
|
||||
OutboundDataRestriction.UNRESTRICTED => TB("The chat may use every tool you chose, web search and any web page included. Internal content, such as your mails, can then reach third parties, e.g., inside a search query or the address of a web page."),
|
||||
OutboundDataRestriction.UNRESTRICTED => TB("The chat may use every tool you chose, web search and any web page included. Internal content, such as your mails or the documents of your data sources, can then reach third parties, e.g., inside a search query or the address of a web page."),
|
||||
|
||||
_ => TB("This version of AI Studio does not know this restriction, so it applies the strictest one."),
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user