Skip to content

Commit

Permalink
- Removed ob_flush as its not needed.
Browse files Browse the repository at this point in the history
  • Loading branch information
jringeisen committed Jan 2, 2025
1 parent 92c31c0 commit da6b3b7
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion app/Http/Controllers/Auth/NewPasswordController.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ function (User $user) use ($request) {
// redirect them back to where they came from with their error message.
if ($status == Password::PASSWORD_RESET) {
$user = User::where('email', $request->email)->firstOrFail();

if ($user->isParent()) {
return redirect()->route('parent.login')->with('status', __($status));
}
Expand Down
4 changes: 2 additions & 2 deletions app/Services/AI/OpenAIService.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ public function createStream(): Dto\AIContentDto
}
}

public function addMessage(string $role, string $content): self
public function addMessage(string $role, ?string $content): self
{
if (trim($content) === '') {
if (is_null($content) || trim($content) === '') {
throw new InvalidArgumentException('Content cannot be null or empty');
}

Expand Down
1 change: 0 additions & 1 deletion app/Services/Adapters/AI/OpenAI/OpenAIAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ function () {

echo 'data: '.json_encode($data, JSON_THROW_ON_ERROR)."\n\n";

ob_flush();
flush();

sleep(0.5);
Expand Down
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit da6b3b7

Please sign in to comment.