mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-03-29 21:11:38 +00:00
20 lines
517 B
C#
20 lines
517 B
C#
namespace AIStudio.Tools.PluginSystem.Assistants.DataModel;
|
|
|
|
internal static class AssistantComponentPropHelper
|
|
{
|
|
public static string ReadString(Dictionary<string, object> props, string key)
|
|
{
|
|
if (props.TryGetValue(key, out var value))
|
|
{
|
|
return value?.ToString() ?? string.Empty;
|
|
}
|
|
|
|
return string.Empty;
|
|
}
|
|
|
|
public static void WriteString(Dictionary<string, object> props, string key, string value)
|
|
{
|
|
props[key] = value ?? string.Empty;
|
|
}
|
|
}
|