Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ public class OpenAiChatOptions implements FunctionCallingOptions {
* the model to call that function. none is the default when no functions are present. auto is the default if
* functions are present. Use the {@link ToolChoiceBuilder} to create a tool choice object.
*/
private @JsonProperty("tool_choice") String toolChoice;
private @JsonProperty("tool_choice") Object toolChoice;
/**
* A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.
*/
Expand Down Expand Up @@ -418,11 +418,11 @@ public void setTools(List<OpenAiApi.FunctionTool> tools) {
this.tools = tools;
}

public String getToolChoice() {
public Object getToolChoice() {
return this.toolChoice;
}

public void setToolChoice(String toolChoice) {
public void setToolChoice(Object toolChoice) {
this.toolChoice = toolChoice;
}

Expand Down Expand Up @@ -650,7 +650,7 @@ public Builder withTools(List<OpenAiApi.FunctionTool> tools) {
return this;
}

public Builder withToolChoice(String toolChoice) {
public Builder withToolChoice(Object toolChoice) {
this.options.toolChoice = toolChoice;
return this;
}
Expand Down
Loading