Compare commits
1
Commits
535603f6d3
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5863858b09 |
@@ -168,13 +168,15 @@ func (e *AnyLLMEngine) Stream(
|
||||
Extra: extra,
|
||||
})
|
||||
|
||||
params.OnChunk(&domain.Chunk{
|
||||
Done: false,
|
||||
ToolName: tc.Function.Name,
|
||||
Role: anyllm.RoleAssistant,
|
||||
Content: tc.Function.Arguments,
|
||||
Reasoning: false,
|
||||
})
|
||||
if params.OnChunk != nil {
|
||||
params.OnChunk(&domain.Chunk{
|
||||
Done: false,
|
||||
ToolName: tc.Function.Name,
|
||||
Role: anyllm.RoleAssistant,
|
||||
Content: tc.Function.Arguments,
|
||||
Reasoning: false,
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -182,11 +184,13 @@ func (e *AnyLLMEngine) Stream(
|
||||
}
|
||||
|
||||
if !toolCalling {
|
||||
params.OnChunk(&domain.Chunk{
|
||||
Done: true,
|
||||
Role: anyllm.RoleAssistant,
|
||||
Content: "",
|
||||
})
|
||||
if params.OnChunk != nil {
|
||||
params.OnChunk(&domain.Chunk{
|
||||
Done: true,
|
||||
Role: anyllm.RoleAssistant,
|
||||
Content: "",
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
if err := <-errChan; err != nil {
|
||||
|
||||
Reference in new issue
Block a user