mirror of
https://github.com/RightNow-AI/openfang.git
synced 2026-07-30 06:32:17 +00:00
fix: Empty string IDs are overwritten, leading to inconsistencies in certain models.
This commit is contained in:
@@ -1173,7 +1173,10 @@ impl LlmDriver for OpenAIDriver {
|
||||
|
||||
// ID (sent in first chunk for this tool)
|
||||
if let Some(id) = call["id"].as_str() {
|
||||
tool_accum[idx].0 = id.to_string();
|
||||
// Fix: Empty string IDs are overwritten, leading to inconsistencies in certain models.
|
||||
if !id.is_empty() {
|
||||
tool_accum[idx].0 = id.to_string();
|
||||
}
|
||||
}
|
||||
|
||||
if let Some(func) = call.get("function") {
|
||||
|
||||
Reference in New Issue
Block a user