Hey, I created a draft pr to support tool use in t...
# koog-agentic-framework
s
Hey, I created a draft pr to support tool use in the streaming api: https://github.com/JetBrains/koog/pull/747 Would like some feedback on it before continuing :)
kodee loving 2
🙏 1
v
cc: @Mark Tkachenko
K 1
👀 1
s
Also sick work on this library, exactly the kind of thing I was looking for heh, I'm very interested in creating some compose extension for it.
kodee happy 1
🙏 2
m
@Stan van der Bend Hello! Thank you very much for your contribution on that issue, it’s very cool. I’ll take a closer look!
s
Thanks @Mark Tkachenko, the main thing I am not sure on is backwards compatibility. We have a few options: 1. change signature of
executeStreaming
to return a flow of stream frame objects (not backwards compatible, but simplifies api) 2. introduce a new function
executeStreamingWithTools
that returns a flow of stream frame object and keep the signature of
executeStreaming
(fully backwards compatible) 3. same as 2 but deprecate
executeStreaming
and notify user to replace it with a new function
executeStreamingTextOnly
and then at some point in the future change the signature of
executeStreaming
to return a flow of stream objects (temporarily backwards compatible, giving users time to migrate without breaking code). I hope this is clear xD, I personally am leaning towards option 3. to the PR currently has option 2.
m
@Stan van der Bend For now we’re allowed to make breaking changes in API 🙂 Personally I’m leaning to the first option
s
PR is ready for review @Mark Tkachenko :3 One thing that I was a little unsure about is whether the streaming api should only emit "completed" tool calls, since some APIs stream partial tool calls (for the streaming of the function arguments json object). I could not really think of a good reason anyone using Koog would want partial tool call streaming, so instead I opted to just combine the partial tool calls before they are emitted.