mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-17 09:18:00 +00:00
Allow creation of chat thread within an existing workspace using a given name
This commit is contained in:
1 file changed
+21
@@ -179,6 +179,27 @@ public abstract partial class AssistantBase : ComponentBase, IMessageBusReceiver
|
|||||||
Blocks = [],
|
Blocks = [],
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected Guid CreateChatThread(Guid workspaceId, string name)
|
||||||
|
{
|
||||||
|
var chatId = Guid.NewGuid();
|
||||||
|
this.chatThread = new()
|
||||||
|
{
|
||||||
|
WorkspaceId = workspaceId,
|
||||||
|
ChatId = chatId,
|
||||||
|
Name = name,
|
||||||
|
Seed = this.RNG.Next(),
|
||||||
|
SystemPrompt = !this.AllowProfiles ? this.SystemPrompt :
|
||||||
|
$"""
|
||||||
|
{this.SystemPrompt}
|
||||||
|
|
||||||
|
{this.currentProfile.ToSystemPrompt()}
|
||||||
|
""",
|
||||||
|
Blocks = [],
|
||||||
|
};
|
||||||
|
|
||||||
|
return chatId;
|
||||||
|
}
|
||||||
|
|
||||||
protected DateTimeOffset AddUserRequest(string request)
|
protected DateTimeOffset AddUserRequest(string request)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user