mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-05-03 09:39:47 +00:00
Allow creation of chat thread within an existing workspace using a given name
This commit is contained in:
parent
9fe6ef9f58
commit
ab1fa49f18
@ -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)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user