mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-15 12:08:27 +00:00
Moved the chats of the BeyondFacts Lab to the embedded chat of assistants (#1203)
This commit is contained in:
1 parent
dc97db256e
commit
cb54ad297d
27 files changed
+1023
-743
No files matched your search
@@ -1,7 +1,8 @@
|
||||
namespace AIStudio.Chat.Embedded;
|
||||
|
||||
/// <summary>
|
||||
/// Decides when an embedded chat sends the message it opens with, see EmbeddedChat.OpeningMessage.
|
||||
/// Decides how an embedded chat opens: when it sends the message it opens with, see EmbeddedChat.OpeningMessage, and
|
||||
/// when it offers to let the model begin, see EmbeddedChat.StartRequest.
|
||||
/// </summary>
|
||||
public static class EmbeddedChatOpening
|
||||
{
|
||||
@@ -19,4 +20,17 @@ public static class EmbeddedChatOpening
|
||||
/// <returns>True when the chat sends the message now.</returns>
|
||||
public static bool SendsNow(ContentText? openingMessage, EmbeddedConversation? conversation, bool wasSent) =>
|
||||
openingMessage is not null && !wasSent && conversation is { IsAvailable: true, IsRunning: false, UserMessageCount: 0 };
|
||||
|
||||
/// <summary>
|
||||
/// Tells whether an embedded chat offers to let the model open its conversation.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Only before anything the user sees: once the model or the user wrote, the conversation has begun. The user may
|
||||
/// always write first instead.
|
||||
/// </remarks>
|
||||
/// <param name="startRequest">The request which lets the model begin, or null without one.</param>
|
||||
/// <param name="conversation">The chat shown, or null while it loads.</param>
|
||||
/// <returns>True when the chat offers to begin.</returns>
|
||||
public static bool OffersStart(string? startRequest, EmbeddedConversation? conversation) =>
|
||||
!string.IsNullOrWhiteSpace(startRequest) && conversation is { IsAvailable: true, IsRunning: false, HasVisibleMessages: false };
|
||||
}
|
||||
Reference in new issue
Block a user