Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev fix tool choice bug #12

Merged
merged 4 commits into from
Mar 3, 2024
Merged
Changes from 2 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
4 changes: 2 additions & 2 deletions openAIChat.m
toshiakit marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,8 @@ function mustBeValidFunctionCall(this, functionCall)
if ~isempty(this.Tools)
toolChoice = "auto";
end
elseif ToolChoice ~= "auto"
% if toolChoice is not empty, then it must be in the format
elseif ~ismember(toolChoice,["auto","none"])
% if toolChoice is not empty, then it must be "auto", "none" or in the format
% {"type": "function", "function": {"name": "my_function"}}
toolChoice = struct("type","function","function",struct("name",toolChoice));
end
Expand Down
Loading