Skip to content

Commit

Permalink
Merge pull request #15 from GeraudBourdin/main
Browse files Browse the repository at this point in the history
Add safe_mode alias to safe_prompt to reflect js library.
  • Loading branch information
GeraudBourdin authored Apr 24, 2024
2 parents b488fec + 2ec123d commit 9fa20c3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/MistralClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@ protected function makeChatCompletionRequest(Messages $messages, array $params,
$return['safe_prompt'] = $params['safe_prompt'];
}

if (isset($params['safe_mode']) && is_bool($params['safe_mode'])) {
$return['safe_prompt'] = $params['safe_prompt'];
}

if (isset($params['tool_choice']) && is_array($params['tool_choice'])) {
$return['tool_choice'] = $params['tool_choice'];
}
Expand Down

0 comments on commit 9fa20c3

Please sign in to comment.