Merge pull request #1315 from trheyi/main
Enhance message handling in OpenAI adapter to skip non-delta "done" m…
This commit is contained in:
commit
b7b586b505
1 changed files with 7 additions and 0 deletions
|
|
@ -68,6 +68,13 @@ func (a *Adapter) Adapt(msg *message.Message) ([]interface{}, error) {
|
|||
return []interface{}{}, nil // Return empty array, nothing to send
|
||||
}
|
||||
|
||||
// Skip "done" messages that are not delta updates
|
||||
// These are final confirmation messages for CUI clients
|
||||
// OpenAI clients don't need them - they use finish_reason instead
|
||||
if msg.Done && !msg.Delta {
|
||||
return []interface{}{}, nil // Return empty array, nothing to send
|
||||
}
|
||||
|
||||
// Get converter for this message type
|
||||
converter, exists := a.registry.GetConverter(msg.Type)
|
||||
if !exists {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue