mirror of
https://github.com/katanemo/plano.git
synced 2026-05-10 16:22:42 +02:00
support developer role in chat completions API (#867)
This commit is contained in:
parent
1d3f4d6c05
commit
7606c55b4b
7 changed files with 15 additions and 8 deletions
|
|
@ -762,7 +762,7 @@ impl ArchFunctionHandler {
|
|||
|
||||
// Keep system message if present
|
||||
if let Some(first) = messages.first() {
|
||||
if first.role == Role::System {
|
||||
if first.role == Role::System || first.role == Role::Developer {
|
||||
if let Some(MessageContent::Text(content)) = &first.content {
|
||||
num_tokens += content.len() / 4; // Approximate 4 chars per token
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue