-
Notifications
You must be signed in to change notification settings - Fork 209
Refactor streaming api to support tool calls #747
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+2,622
−354
Merged
Changes from all commits
Commits
Show all changes
61 commits
Select commit
Hold shift + click to select a range
bd0a601
Refactor streaming interface to use `StreamingFrame` and add tool cal…
dosier 2ec615c
Remove deprecated annotation from legacy streaming functions and docu…
dosier d67bf89
Add `tools` parameter to `execute` calls in `CalculatorPromptExecutor`.
dosier 2667102
Refactor streaming interface to replace `StreamingFrame` with `Stream…
dosier 1b630e2
Refactor `StreamChunk` to `StreamFrame` across streaming interfaces a…
dosier 8c83a71
Fix typo: Replace `StreamingFrame` with `StreamFrame` in `executeStre…
dosier 7d62c0f
Add `mapTextOnly` utility and integrate `WithTools` streaming refinem…
dosier 3d060dc
feat: enhance streaming API with tool call support and nullable handling
rubencagnie-toast 29f1546
docs: add KDoc documentation for new streaming functions and properties
rubencagnie-toast 8a3f7c3
test: fix test compilation errors after streaming API changes
rubencagnie-toast 2481948
Remove `-SNAPSHOT`
rubencagnie-toast 8800d77
Add handlers
rubencagnie-toast fc1ab09
Suspend
rubencagnie-toast 37b5879
Added tests
rubencagnie-toast b1644df
Merge remote-tracking branch 'refs/remotes/jb/develop' into streaming…
dosier ddcbdf1
Changed signature of `executeStreaming` and related funcs to return `…
dosier 65d5b53
Merge upstream/streaming-tools: Resolve conflicts between streaming i…
rubencagnie-toast 273e903
Merge conflicts
rubencagnie-toast b2e7f2b
Omit `WithTools`
rubencagnie-toast 89163d7
Fix tests
rubencagnie-toast b63a71c
Refactor `filterTextOnly` utility: move to `ai.koog.prompt.streaming`…
dosier 7c1479b
Added `StreamFrame.End` and removed index from ToolCall
rubencagnie-toast 3bbf8c1
Added StreamFrame.End, introduced stream flow builder and operators
dosier 22177d7
Fixed formatting and resolved ktlin errors
dosier 62971ae
Merge branch 'streaming-tools' into streaming-tools-ruben
dosier ca326b8
Fixed remaining merging errors, using new flow building extensions
dosier 053b608
Removed partial tool call streaming support, relying on `response.out…
dosier 5b684ce
Adding an example to test the streaming logic
rubencagnie-toast 0895d55
Remove logging from Example
rubencagnie-toast e0027a7
Updated stream flow builder api to support for auto merging of chunke…
dosier 1937850
Some refactoring, removed unused tool call context class
dosier ef4ef49
Emit previous pending tool call if the new id is different
dosier f6f7279
Merge remote-tracking branch 'ruben/streaming-tools' into streaming-t…
dosier e9fe8fd
Add test cases for StreamFrameFlowBuilder; refactor streaming chunk p…
dosier 3aa210d
Slight refactor / doc fix in StreamFrameFlowBuilder.kt
dosier 0a0b20a
Fix GoogleLLMClient (include finish reason and emit end frame correctly)
dosier 4babf3e
Remove useless elvis operator for non null mapping in StreamFrameExt.kt
dosier ee1729c
Added `ResponseMetaInfo` property to `StreamFrame.End`
dosier 169f719
Merge remote-tracking branch 'jb/develop' into streaming-tools
dosier 5bbbc46
Remove the blank frame check in `.toAssistant` and return null on no …
dosier 5f6c462
Refactor to use Iterable instead of List in StreamFrame extension fun…
dosier 3c4de4f
Refactor and improve `.toMessageResponses` logic; simplify `.toTools`…
dosier 98b000c
Rename extension functions for clarity: `.toTools` to `.toToolCallMes…
dosier 74a1ef4
Reorder message creation logic in `StreamFrameExt` to prioritize tool…
dosier 7a63f59
Add unit tests for `StreamFrameExt` extension functions in `StreamFra…
dosier 9fb31e1
Refactor `filterTextOnly` to inline `filterAppendsOnly` for simplicit…
dosier 08b5a73
Refactor `nodeLLMRequestStreamingAndSendResults` to simplify stream p…
dosier bd3ee43
Partially fix Anthropic streaming logic
OKatrych badf8c9
Update `streaming-api.md` to enhance clarity and align with recent AP…
dosier c65fa33
Merge pull request #2 from OKatrych/anthropic-fix
dosier a996247
Refactor `AnthropicLLMClient` to use `buildStreamFrameFlow` for clean…
dosier 3aaacb0
Rename `appendToolCall` to `upsertToolCall` in StreamFrameFlowBuilder
dosier 29503a9
Fixed styling issues (ktlint)
dosier 60391c6
Updated AWS models stream response parsing and tests
dosier 04fd2d2
Handle `ResponseCompleted` event in `OpenAILLMClient` to create `Stre…
dosier 22fe17e
Merge remote-tracking branch 'jb/develop' into streaming-tools
dosier 14273ad
Add `StreamFrameFlowBuilderError` sealed class and enhance error hand…
dosier 6387b0a
Enhance error handling in `StreamFrameFlowBuilder` with additional er…
dosier 86d775e
Align `onStreamError` handling across core, examples, and documentati…
dosier b02483d
Rethrow the caught error in stream frame flow
dosier b810722
Fix example example-streaming-api-02-02.kt
kpavlov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.