Skip to content

Commit c1c0d17

Browse files
Marco van AngerenMarco van Angeren
authored andcommitted
Fixed style issues (fabbot)
1 parent 935dcd6 commit c1c0d17

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

src/chat/src/Chat.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function submit(UserMessage $message): AssistantMessage|AccumulatingStrea
4848

4949
if ($result instanceof StreamResult || $result instanceof ToolboxStreamResult) {
5050
if (!$this->store instanceof StreamableStoreInterface) {
51-
throw new RuntimeException($this->store::class . ' does not support streaming.');
51+
throw new RuntimeException($this->store::class.' does not support streaming.');
5252
}
5353

5454
return new AccumulatingStreamResult($result, function (AssistantMessage $assistantMessage) use ($messages) {

src/chat/src/Result/AccumulatingStreamResult.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function addOnComplete(\Closure $callback): void
4141
$existingCallback($message);
4242
$callback($message);
4343
}
44-
: $callback;
44+
: $callback;
4545
}
4646

4747
public function getContent(): \Generator
@@ -61,9 +61,9 @@ public function getContent(): \Generator
6161
yield $value;
6262
}
6363
} finally {
64-
if ($this->onComplete !== null) {
64+
if (null !== $this->onComplete) {
6565
$assistantMessage = Message::ofAssistant(
66-
$accumulatedContent === '' ? null : $accumulatedContent,
66+
'' === $accumulatedContent ? null : $accumulatedContent,
6767
$toolCalls ?: null
6868
);
6969

@@ -79,4 +79,3 @@ public function getMetadata(): Metadata
7979
return $this->innerResult->getMetadata();
8080
}
8181
}
82-

src/chat/src/StreamableStoreInterface.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,3 @@
1717
interface StreamableStoreInterface
1818
{
1919
}
20-

0 commit comments

Comments
 (0)