Skip to content

Support separation of streaming from PromptingTools.jl#20

Open
Sixzero wants to merge 3 commits intosvilupp:mainfrom
Sixzero:feature/complete-streaming-implementation
Open

Support separation of streaming from PromptingTools.jl#20
Sixzero wants to merge 3 commits intosvilupp:mainfrom
Sixzero:feature/complete-streaming-implementation

Conversation

@Sixzero
Copy link
Contributor

@Sixzero Sixzero commented Aug 11, 2025

This PR enables StreamCallbacks.jl to work independently after streaming functionality was moved out of PromptingTools.jl core.

Related PR

Works with: svilupp/PromptingTools.jl#307

Changes Made

Integration with PromptingTools.jl:

  • Added PromptingTools dependency to Project.toml
  • Import AbstractStreamCallback from PromptingTools
  • Implement configure_callback! and streamed_request! methods for PromptingTools integration

Interface Updates:

  • Use PromptingTools' AbstractStreamCallback as base type
  • Create AbstractHTTPStreamCallback subtype indicating HTTP backend in the package
  • Remove duplicate Base methods (now handled by PromptingTools)

Moved streaming precompilation from PromptingTools to here

Benefits

  • Clean Architecture: Proper separation of concerns between packages
  • Backward Compatibility: Existing streaming code continues to work unchanged

Usage

After both PRs merge, streaming works exactly as before:

using PromptingTools, StreamCallbacks
msg = aigenerate("Hello"; streamcallback=StreamCallback())

Version bumped to 0.7.0 to reflect the architectural change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant