Skip to content

Commit

Permalink
feat: add required as tool choice
Browse files Browse the repository at this point in the history
  • Loading branch information
eugene-yao-zocdoc committed Sep 6, 2024
1 parent 7f153b3 commit 6a38ed5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion OpenAI.SDK/ObjectModels/RequestModels/ToolChoiceFunction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ public class ToolChoice
{
public static ToolChoice None => new() { Type = StaticValues.CompletionStatics.ToolChoiceType.None };
public static ToolChoice Auto => new() { Type = StaticValues.CompletionStatics.ToolChoiceType.Auto };
public static ToolChoice Required => new() { Type = StaticValues.CompletionStatics.ToolChoiceType.Required };

/// <summary>
/// "none" is the default when no functions are present. <br />
Expand Down Expand Up @@ -91,4 +92,4 @@ public override void Write(Utf8JsonWriter writer, ToolChoiceOneOfType? value, Js
}
}
}
}
}
3 changes: 2 additions & 1 deletion OpenAI.SDK/ObjectModels/StaticValueHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public static class ToolChoiceType
public static string Function => ToolType.Function;
public static string Auto => "auto";
public static string None => "none";
public static string Required => "required";
}
}

Expand Down Expand Up @@ -173,4 +174,4 @@ public static class RequiredActionTypes
public static string SubmitToolOutputs => "submit_tool_outputs";
}
}
}
}

0 comments on commit 6a38ed5

Please sign in to comment.