- Issue created by @marcus_johansson
- 🇩🇪Germany marcus_johansson
For testing, please test before and after the MR, to make sure that it works as advertised.
Currently due to the following code, the system prompt will be set twice. This does not affect quality, however it adds extra input tokens:
if ($this->chatSystemRole) {
$chat_input[] = [
'role' => 'system',
'content' => [
[
'type' => 'text',
'text' => $this->chatSystemRole,
],
],
];
// If its o1 or o3 in it, we add it as a user message.
if (preg_match('/(o1|o3)/i', $model_id)) {
$chat_input[] = [
'role' => 'user',
'content' => $this->chatSystemRole,
];
}
else {
$chat_input[] = [
'role' => 'system',
'content' => $this->chatSystemRole,
];
}
}
Make sure its only set once.
Active
1.1
Code
For testing, please test before and after the MR, to make sure that it works as advertised.