Skip to content

Add Streaming Response - #39

Merged
rrr63 merged 2 commits into
doppar:1.xfrom
rrr63:streaming
Mar 4, 2026
Merged

rrr63 merged 2 commits into
doppar:1.xfrom
rrr63:streaming

Conversation

@rrr63

@rrr63 rrr63 commented Mar 2, 2026

Copy link
Copy Markdown
Member

How to call it :

$stream = Agent::using(OpenRouter::class)
    ->withKey('')
    ->model('')
    ->prompt('What is capital of France ?')
    ->withStreaming()
    ->send();

foreach ($stream as $chunk) {
    echo $chunk;
}

// or 

$stream = Agent::using(OpenRouter::class)
    ->withKey('')
    ->model('')
    ->prompt('What is capital of France ?')
    ->stream();

foreach ($stream as $chunk) {
    echo $chunk;
}

@rrr63
rrr63 requested review from NazmusShakib and techmahedy and removed request for NazmusShakib March 2, 2026 07:31

@techmahedy techmahedy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rrr63 just loved it

@rrr63
rrr63 merged commit 915b26b into doppar:1.x Mar 4, 2026
5 checks passed
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.

2 participants