mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-05 08:07:21 +00:00
Added a SWOT analysis assistant (#1122)
Co-authored-by: hart_s3 <sabrina.hartmann@dlr.de>
This commit is contained in:
1 parent
6cb20fd75a
commit
060a2a5734
87 files changed
+4601
-45
No files matched your search
@@ -0,0 +1,48 @@
|
||||
namespace AIStudio.Assistants.SWOTAnalysis;
|
||||
|
||||
internal static class SwotAnalysisPromptInput
|
||||
{
|
||||
public static string BuildSections(
|
||||
string analysisSubject,
|
||||
string analysisGoal,
|
||||
string analysisFocus,
|
||||
SwotContextualKnowledge contextualKnowledge,
|
||||
string sharedResearch = "") =>
|
||||
$"""
|
||||
<analysis-subject>
|
||||
{analysisSubject}
|
||||
</analysis-subject>
|
||||
|
||||
<analysis-goal>
|
||||
{analysisGoal}
|
||||
</analysis-goal>
|
||||
|
||||
<analysis-focus>
|
||||
{FocusOrDefault(analysisFocus)}
|
||||
</analysis-focus>
|
||||
|
||||
<contextual-knowledge>
|
||||
{contextualKnowledge.Describe()}
|
||||
</contextual-knowledge>
|
||||
{SharedResearchSection(sharedResearch)}
|
||||
""";
|
||||
|
||||
/// <summary>
|
||||
/// The analysis focus, or what stands in for a focus nobody gave.
|
||||
/// </summary>
|
||||
public static string FocusOrDefault(string analysisFocus) => string.IsNullOrWhiteSpace(analysisFocus)
|
||||
? "No additional analysis focus was provided."
|
||||
: analysisFocus;
|
||||
|
||||
/// <summary>
|
||||
/// The shared-research section, which follows the other sections; empty without research.
|
||||
/// </summary>
|
||||
public static string SharedResearchSection(string sharedResearch) => string.IsNullOrWhiteSpace(sharedResearch)
|
||||
? string.Empty
|
||||
: $"""
|
||||
|
||||
<shared-research>
|
||||
{sharedResearch.Trim()}
|
||||
</shared-research>
|
||||
""";
|
||||
}
|
||||
Reference in new issue
Block a user