Skip to content

Commit

Permalink
Add streaming content generation support
Browse files Browse the repository at this point in the history
  • Loading branch information
erdemkose committed Jul 1, 2024
1 parent 0f4b584 commit aa3152a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/ChatSession.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,17 @@ public function sendMessage(string $text): string
->text();
}

/**
* @throws ClientExceptionInterface
*/
public function sendMessageStream(
string $text,
): string {
return $this->chatSession
->sendMessage(new TextPart($text))
->text();
}

/**
* @return array<int, array{
* message: string,
Expand Down

0 comments on commit aa3152a

Please sign in to comment.