mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-18 03:57:59 +00:00
Split the reasoning parameters into dialects
This commit is contained in:
15 files changed
+845
-488
No files matched your search
@@ -0,0 +1,20 @@
|
||||
namespace AIStudio.Provider.Reasoning.Dialects;
|
||||
|
||||
/// <summary>
|
||||
/// Ollama's "think" parameter.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// One key, and it takes a boolean as readily as a level, which is why it needs no reading of its
|
||||
/// own beyond the ordinary one.
|
||||
/// </remarks>
|
||||
public sealed class OllamaThinkDialect : IReasoningDialect
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public ReasoningDialect Dialect => ReasoningDialect.OLLAMA_THINK;
|
||||
|
||||
/// <inheritdoc />
|
||||
public ReasoningConfigurationState Detect(IDictionary<string, object> parameters) =>
|
||||
ReasoningParameters.TryGet(parameters, "think", out var think)
|
||||
? ReasoningParameters.LevelOf(think)
|
||||
: ReasoningConfigurationState.NOT_CONFIGURED;
|
||||
}
|
||||
Reference in new issue
Block a user