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