Skip to content

Commit

Permalink
Moved logic to remove errors
Browse files Browse the repository at this point in the history
  • Loading branch information
PapaRascal2020 committed Sep 27, 2024
1 parent a6cd795 commit ffff4a8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
14 changes: 6 additions & 8 deletions stubs/default/resources/views/Shared/layout.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,12 @@
</div>
<nav class="space-y-4">
<a href="/sidekick/playground/chat" class="block text-white hover:bg-gray-600 px-4 py-2 rounded">Chats</a>
@if(isset($conversations))
@foreach($conversations as $conversation)
<a href="/sidekick/playground/chat/{{$conversation->id}}"
class="block text-white text-xs hover:bg-gray-600 px-6 py-2 rounded">
{{($conversation->model != '') ? $conversation->model : 'Auto-Select'}} : {{explode('-', $conversation->id)[0]}}
</a>
@endforeach
@endif
@foreach((new SidekickConversation())->database()->all('id', 'model', 'created_at') as $conversation)
<a href="/sidekick/playground/chat/{{$conversation->id}}"
class="block text-white text-xs hover:bg-gray-600 px-6 py-2 rounded">
{{($conversation->model != '') ? $conversation->model : 'Auto-Select'}} : {{explode('-', $conversation->id)[0]}}
</a>
@endforeach
<a href="/sidekick/playground/completion" class="block text-white hover:bg-gray-600 px-4 py-2 rounded">Completion</a>
<a href="/sidekick/playground/image" class="block text-white hover:bg-gray-600 px-4 py-2 rounded">Image Generation</a>
<a href="/sidekick/playground/audio" class="block text-white hover:bg-gray-600 px-4 py-2 rounded">Audio Generation</a>
Expand Down
5 changes: 0 additions & 5 deletions stubs/default/routes/web.sidekick.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
use Illuminate\Support\Facades\View;
use \PapaRascalDev\Sidekick\Drivers\OpenAi;
use PapaRascalDev\Sidekick\SidekickConversation;

// Remove when I make a better playground but is important for now for the sidebar
View::share('conversations', (new SidekickConversation())->database()->all('id', 'model', 'created_at'));

Route::post('/sidekick/playground/chat', function (Request $request) {

Expand Down

0 comments on commit ffff4a8

Please sign in to comment.