You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: app/Http/Controllers/ChatController.php
+68-52Lines changed: 68 additions & 52 deletions
Original file line number
Diff line number
Diff line change
@@ -7,12 +7,16 @@
7
7
useIlluminate\Http\Request;
8
8
useIlluminate\Support\Str;
9
9
useIlluminate\Http\JsonResponse;
10
+
useIlluminate\Support\Facades\Log;
10
11
useIlluminate\Support\Facades\Storage;
11
12
useIlluminate\Validation\Rules\File;
12
13
useInertia\Inertia;
14
+
usePHPUnit\Event\Runtime\PHP;
13
15
14
16
class ChatController extends Controller
15
17
{
18
+
private$preset = ['role' => 'system', 'content' => 'You are GeekChat - A ChatGPT clone. Answer as concisely as possible. Using Simplified Chinese as the first language.'];
19
+
16
20
publicfunctionindex()
17
21
{
18
22
return Inertia::render('Chat');
@@ -32,30 +36,68 @@ public function chat(Request $request): JsonResponse
['role' => 'system', 'content' => 'You are GeekChat - A ChatGPT clone. Answer as concisely as possible. Using Simplified Chinese as the first language.']
0 commit comments