mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-14 16:54:21 +00:00
Multiple Profiles can now be selected
This commit is contained in:
1 parent
d043fbc8f0
commit
cefc5464d5
89 files changed
+1360
-503
No files matched your search
@@ -94,6 +94,25 @@ public record Profile(
|
||||
{actions}
|
||||
""";
|
||||
}
|
||||
|
||||
public static string ToSystemPrompt(IReadOnlyList<Profile> profiles)
|
||||
{
|
||||
if (profiles.Count == 0)
|
||||
return string.Empty;
|
||||
|
||||
var profileSections = profiles.Select((profile, index) =>
|
||||
$"""
|
||||
## Profile {index + 1}: {profile.Name}
|
||||
|
||||
{profile.ToSystemPrompt()}
|
||||
""");
|
||||
|
||||
return $"""
|
||||
The user selected the following profiles. Combine them as equally important context. If their instructions conflict, resolve the conflict as well as possible.
|
||||
|
||||
{string.Join("\n\n---\n\n", profileSections)}
|
||||
""";
|
||||
}
|
||||
|
||||
public static bool TryParseProfileTable(int idx, LuaTable table, Guid configPluginId, out ConfigurationBaseObject template)
|
||||
{
|
||||
@@ -151,4 +170,4 @@ public record Profile(
|
||||
}
|
||||
""";
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user