f试ssefahahå�¯èƒ½å�¡å�¡å�¡é©¬å�¡å�¡è®¡ç®—机视觉事实上事实上飒飒飒gjâ—�â—�â—�â—�hfkttkgdgkmcuocucocucocé¡¶é¡¶é¡¶é¡¶é¡¶é¡¶é¡¶é¡¶é¡¶é¡¶é¡¶é¡¶uco朵朵å�¯å�¯æ”¾2å·�峨2555555666369🌹 �����ѩ�����һ����dddf2qevf2fv69666 ? PNG ?%k25u25%fgd5n!? PNG ?%k25u25%fgd5n!? PNG ?%k25u25%fgd5n!? PNG ?%k25u25%fgd5n!database/migrations/2025_05_23_143630_create_voice_chat_bots_table.php000064400000001650152666206450021140 0ustar00id(); $table->foreignIdFor(User::class)->constrained()->cascadeOnDelete(); $table->string('welcome_message'); $table->string('instruction'); $table->string('language'); $table->string('voice_id'); $table->string('agent_id'); $table->string('ai_model'); $table->string('title'); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('voice_chat_bots'); } }; database/migrations/2025_05_23_154408_create_voice_chat_bot_trains_table.php000064400000002252152666206450022341 0ustar00id(); $table->foreignId('chatbot_id')->references('id')->on('voice_chat_bots')->constrained()->cascadeOnDelete(); $table->foreignIdFor(User::class)->constrained()->cascadeOnDelete(); $table->string('doc_id')->nullable(); $table->string('name'); $table->enum('type', TrainTypeEnum::toArray()); $table->string('text')->nullable(); $table->string('url')->nullable(); $table->string('file')->nullable(); $table->datetime('trained_at')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('voice_chat_bot_trains'); } }; extension.json000064400000000215152666206450007465 0ustar00{ "name": "Elevenlabs Voice Chat", "type": "extension", "version": "1.2", "description": "Elevenlabs voice chat extension for magicai" } System/Services/ElevenLabsVoiceChatService.php000064400000014173152666206450015475 0ustar00first(); if ($chatbot) { return $chatbot; } else { $defaultParams = $this->defaultParams(); $res = $this->createAgent($defaultParams); if ($res?->getData()->status == 'success') { $defaultParams['agent_id'] = $res->getData()->resData->agent_id; $defaultParams['user_id'] = auth()->id(); return VoiceChatBot::create($defaultParams); } else { return []; } } } /** * get voices from elevenlabs */ public function getVoices(): array { $res = $this->service->getListOfVoices(page_size: 100); if ($res->getData()->status == 'success') { return $res->getData()->resData->voices; } return []; } /** * create agent * * @param mixed $args */ public function createAgent($args): JsonResponse { $conversation_config = [ 'agent' => [ 'first_message' => $args['welcome_message'], 'prompt' => [ 'prompt' => $args['instruction'], ], ], 'tts' => [ 'model_id' => ElevenLabsService::DEFAULT_ELEVENLABS_MODEL_FOR_ENGLISH, ], 'conversation' => [ 'client_events' => ['audio', 'interruption', 'user_transcript', 'agent_response'], ], ]; if (isset($args['language']) && $args['language'] != null && $args['language'] != 'auto') { $conversation_config['agent']['language'] = $args['language']; if ($args['language'] != 'en') { $conversation_config['tts']['model_id'] = ElevenLabsService::DEFAULT_ELEVENLABS_MODEL; } } return $this->service->createAgent(conversation_config: $conversation_config, name: $args['title']); } /** * update agent * * @return JsonResponse|void */ public function updateAgent(string|int $agent_id) { $agent = VoiceChatBot::find($agent_id); if (empty($agent)) { return; } $conversation_config = [ 'agent' => [ 'first_message' => $agent->welcome_message, 'prompt' => [ 'prompt' => $agent->instructions, ], ], 'tts' => [ 'voice_id' => $agent->voice_id, 'model_id' => ElevenLabsService::DEFAULT_ELEVENLABS_MODEL_FOR_ENGLISH, ], ]; if (isset($agent->language) && $agent->language != null && $agent->language != 'auto') { $conversation_config['agent']['language'] = $agent->language; if ($agent->language != 'en') { $conversation_config['tts']['model_id'] = ElevenLabsService::DEFAULT_ELEVENLABS_MODEL; } } $this->updateAgentWithKnowledgebase($agent_id); return $this->service->updateAgent(agent_id: $agent->agent_id, conversation_config: $conversation_config, name: $agent->name); } /** * update the agent with knowledgebase by trianing the content */ public function updateAgentWithKnowledgebase(string|int $chatbot_id): void { $trains = VoiceChatBotTrain::query() ->whereNotNull('trained_at') ->whereNotNull('doc_id') ->where('chatbot_id', $chatbot_id) ->get(); $trainedKnowledges = $trains->map(fn ($train) => [ 'id' => $train->doc_id, 'name' => $train->name, 'type' => $train->type, ])->all(); if (empty($trainedKnowledges)) { return; } $config = [ 'agent' => [ 'prompt' => [ 'knowledge_base' => $trainedKnowledges, ], ], ]; $agent_id = VoiceChatBot::findOrFail($chatbot_id)?->agent_id; if ($agent_id) { $this->service->updateAgent(agent_id: $agent_id, conversation_config: $config); } } /** * delete knowledgebase from elevenlabes */ public function deleteKnowledgebase(string $doc_id): JsonResponse { return $this->service->deleteKnowledgebaseDocument($doc_id); } /** * add knowledgebase to elevenlabs * * @param mixed $content */ public function addKnowledgebase( string $type, $content, ?string $name = null ): JsonResponse { return match ($type) { 'text' => $this->service->createKnowledgebaseDocFromText(text: $content, name: $name), 'url' => $this->service->createKnowledgebaseDocFromUrl(url: $content, name: $name), 'file' => $this->service->createKnowledgebaseDocFromFile(file: $content, name: $name), }; } /** * default voice chat params */ private function defaultParams(): array { return [ 'welcome_message' => 'Hey there, How can I help you?', 'instruction' => 'You are good customer assistant', 'language' => 'en', 'title' => ElevenLabsVoiceChatService::ELEVENLABS_VOICE_CHATBOT_TITLE, 'voice_id' => ElevenLabsService::DEFAULT_ELEVENLABS_VOICE_ID, 'ai_model' => ElevenLabsService::DEFAULT_ELEVENLABS_MODEL_FOR_ENGLISH, ]; } } System/Models/VoiceChatBot.php000064400000001536152666206450012317 0ustar00hasMany(VoiceChatBotTrain::class, 'chatbot_id'); } /** * voice chabot owner */ public function user(): BelongsTo { return $this->belongsTo(User::class); } } System/Models/VoiceChatBotTrain.php000064400000000527152666206450013314 0ustar00contents as $url => $data) { VoiceChatBotTrain::query() ->firstOrCreate([ 'type' => TrainTypeEnum::url, 'user_id' => Auth::id(), 'chatbot_id' => $chatbot->getKey(), 'url' => $url, ], [ 'name' => $data['title'], ]); } } public function crawl(bool $single = false): static { $this->crawlPage($this->baseUrl, $single); return $this; } private function crawlPage(string $url, bool $single): void { ini_set('max_execution_time', -1); // 5 minutes $html = @file_get_contents($url); if ($html === false) { return; // Handle the error appropriately } preg_match('/(.*?)<\/title>/si', $html, $titleMatch); $title = $titleMatch[1] ?? 'Untitled'; // Default to 'Untitled' if no title found // Store the title and content in an associative array $this->contents[$url] = [ 'title' => $title, ]; if ($single) { return; // No need to continue if crawling a single page } preg_match_all('/<a\s+(?:[^>]*?\s+)?href="([^"]*)"/', $html, $matches); foreach ($matches[1] as $link) { $absoluteLink = $this->makeAbsoluteUrl($link); if ($this->isValidLink($absoluteLink)) { $this->links[] = $absoluteLink; if (count($this->links) >= $this->maxLinks) { return; } $this->crawlPage($absoluteLink, false); } } } private function makeAbsoluteUrl(string $url): ?string { if (str_starts_with($url, 'http') || str_starts_with($url, 'https')) { return $url; } if (str_starts_with($url, '/')) { return parse_url($this->baseUrl, PHP_URL_SCHEME) . '://' . parse_url($this->baseUrl, PHP_URL_HOST) . $url; } return null; } private function isValidLink(?string $url): bool { return $url && ! in_array($url, $this->links, true) && $this->isSameDomain($url, $this->baseUrl) && ! $this->hasInvalidPath($url) && ! $this->isImage($url); } private function isSameDomain(string $url1, string $url2): bool { return parse_url($url1, PHP_URL_HOST) === parse_url($url2, PHP_URL_HOST); } private function hasInvalidPath(string $url): bool { return (bool) array_filter($this->invalidPaths, fn ($invalidPath) => str_contains($url, $invalidPath)); } private function isImage(string $url): bool { $imageExtensions = ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'apng', 'avif', 'svg', 'webp', 'ico', 'tiff']; $extension = strtolower(pathinfo($url, PATHINFO_EXTENSION)); return in_array($extension, $imageExtensions, true); } public function getContents(): array { return $this->contents; } public function getLinks(): array { return $this->links; } public function getBaseUrl(): string { return $this->baseUrl; } public function setBaseUrl(string $baseUrl): self { $this->baseUrl = $baseUrl; return $this; } } ���������������������������������������������������������������������������������System/Enum/TrainTypeEnum.php�����������������������������������������������������������������������0000644�����������������00000000676�15266620645�0012236 0����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?php namespace App\Extensions\ElevenLabsVoiceChat\System\Enum; use App\Enums\Traits\EnumTo; enum TrainTypeEnum: string { use EnumTo; case url = 'url'; case file = 'file'; case text = 'text'; public static function isInValid(string $step): bool { return ! self::isValid($step); } public static function isValid(string $step): bool { return in_array($step, self::toArray(), true); } } ������������������������������������������������������������������System/ElevenLabsVoiceChatServiceProvider.php�������������������������������������������������������0000644�����������������00000005146�15266620645�0015425 0����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?php declare(strict_types=1); namespace App\Extensions\ElevenLabsVoiceChat\System; use App\Extensions\ElevenLabsVoiceChat\System\Http\Controllers\ElevenLabsVoiceChatController; use App\Extensions\ElevenLabsVoiceChat\System\Http\Controllers\ElevenLabsVoiceChatTrainController; use Illuminate\Contracts\Http\Kernel; use Illuminate\Routing\Router; use Illuminate\Support\Facades\Route; use Illuminate\Support\ServiceProvider; class ElevenLabsVoiceChatServiceProvider extends ServiceProvider { public function register(): void {} public function boot(Kernel $kernel): void { $this->registerMigrations() ->registerRoutes() ->registerViews(); } public function registerMigrations(): static { $this->loadMigrationsFrom(__DIR__ . '/../database/migrations'); return $this; } public function registerViews(): void { $this->loadViewsFrom([__DIR__ . '/../resources/views'], 'elevenlabs-voice-chat'); } private function registerRoutes(): static { $this->router() ->group([ 'middleware' => ['web', 'auth'], ], function (Router $route) { $route->group([ 'prefix' => 'dashboard/admin/voice-chatbot', 'as' => 'dashboard.admin.voice-chatbot.', ], function (Router $router) { $router->get('', [ElevenLabsVoiceChatController::class, 'index'])->name('index'); $router->put('update', [ElevenLabsVoiceChatController::class, 'update'])->name('update'); $router->post('check-balance', [ElevenLabsVoiceChatController::class, 'checkVoiceBalance'])->name('check-Balance'); $router->group([ 'prefix' => 'train', 'as' => 'train.', 'controller' => ElevenLabsVoiceChatTrainController::class, ], function (Router $router) { $router->get('data', 'trainData')->name('data'); $router->post('file', 'trainFile')->name('file'); $router->post('text', 'trainText')->name('text'); $router->post('url', 'trainUrl')->name('url'); $router->post('generate', 'generateEmbedding')->name('generate'); $router->delete('delete', 'delete')->name('delete'); }); }); }); return $this; } private function router(): Router|Route { return $this->app['router']; } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������System/Http/Controllers/ElevenLabsVoiceChatController.php�������������������������������������������0000644�����������������00000005544�15266620645�0017664 0����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?php namespace App\Extensions\ElevenLabsVoiceChat\System\Http\Controllers; use App\Domains\Entity\Enums\EntityEnum; use App\Domains\Entity\Facades\Entity as EntityFacade; use App\Extensions\ElevenLabsVoiceChat\System\Http\Requests\VoiceChatbotUpdateRequest; use App\Extensions\ElevenLabsVoiceChat\System\Services\ElevenLabsVoiceChatService; use App\Helpers\Classes\Helper; use App\Http\Controllers\Controller; use Exception; use Illuminate\Http\JsonResponse; use Illuminate\Http\Request; use Illuminate\Support\Facades\Cache; use Throwable; class ElevenLabsVoiceChatController extends Controller { public function __construct(public ElevenLabsVoiceChatService $service) {} /** * setting page for elevenlabs voice chat */ public function index() { $item = $this->service->fetchVoiceChatbot(); $data = empty($item) ? null : $item->trainData(); $voices = $this->service->getVoices(); return view('elevenlabs-voice-chat::index', compact('item', 'data', 'voices')); } /** * update the voice chatbot configure */ public function update(VoiceChatbotUpdateRequest $request): JsonResponse { $data = $request->validated(); try { $chatbot = $this->service->fetchVoiceChatbot(); $chatbot->update($data); return response()->json(['status' => 'success']); } catch (Throwable $th) { return response()->json([ 'status' => 'error', 'message' => 'Something went wrong!', 'erroMessage' => $th->getMessage(), ]); } } public function checkVoiceBalance(Request $request): ?JsonResponse { if (Helper::appIsDemo()) { $clientIp = Helper::getRequestIp(); $cacheKey = "voice-chat-attempt-:{$clientIp}:" . now()->format('Y-m-d'); $requestCount = Cache::get($cacheKey, 0); Cache::put($cacheKey, $requestCount + 1, now()->addDay()->startOfDay()); if ($requestCount >= 25) { return response()->json(['status' => 'error', 'message' => 'Exceeded messages limit on demo'], 200); } return response()->json(['status' => 'success', 'message' => 'Demo mode'], 200); } $chatbot = $this->service->fetchVoiceChatbot(); if (! empty($chatbot)) { $user = $chatbot->user; $driver = EntityFacade::driver(EntityEnum::ELEVENLABS_VOICE_CHATBOT)->forUser($user); try { $driver->redirectIfNoCreditBalance(); } catch (Exception $e) { return response()->json([ 'message' => $e->getMessage(), 'status' => 'error', ], 200); } } return response()->json(['status' => 'success', 'message' => ''], 200); } } ������������������������������������������������������������������������������������������������������������������������������������������������������������System/Http/Controllers/ElevenLabsVoiceChatTrainController.php��������������������������������������0000644�����������������00000015756�15266620645�0020670 0����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?php namespace App\Extensions\ElevenLabsVoiceChat\System\Http\Controllers; use App\Extensions\ElevenLabsVoiceChat\System\Enum\TrainTypeEnum; use App\Extensions\ElevenLabsVoiceChat\System\Http\Requests\Train\DataRequest; use App\Extensions\ElevenLabsVoiceChat\System\Http\Requests\Train\FileRequest; use App\Extensions\ElevenLabsVoiceChat\System\Http\Requests\Train\TextRequest; use App\Extensions\ElevenLabsVoiceChat\System\Http\Requests\Train\TrainRequest; use App\Extensions\ElevenLabsVoiceChat\System\Http\Requests\Train\TrainUrlRequest; use App\Extensions\ElevenLabsVoiceChat\System\Http\Resources\ChatbotTrainResource; use App\Extensions\ElevenLabsVoiceChat\System\Models\VoiceChatBotTrain; use App\Extensions\ElevenLabsVoiceChat\System\Parsers\LinkParser; use App\Extensions\ElevenLabsVoiceChat\System\Services\ElevenLabsVoiceChatService; use App\Helpers\Classes\Helper; use App\Http\Controllers\Controller; use Illuminate\Http\JsonResponse; use Illuminate\Http\Resources\Json\AnonymousResourceCollection; use Illuminate\Http\UploadedFile; use Illuminate\Support\Facades\Auth; class ElevenLabsVoiceChatTrainController extends Controller { public function __construct(public ElevenLabsVoiceChatService $service) {} /** * return voice chatbot trian data */ public function trainData(DataRequest $request): AnonymousResourceCollection { return ChatbotTrainResource::collection( $this->service->fetchVoiceChatbot() ->trainData() ->when($request->validated('type'), fn ($query) => $query->where('type', $request->validated('type'))) ->get() ); } /** * delete voice chabot trian data */ public function delete(TrainRequest $request): JsonResponse { $chatbot = $this->service->fetchVoiceChatbot(); $trains = $chatbot->trainData()->whereIn('id', $request->validated('data'))->get(); foreach ($trains as $train) { if ($train->trained_at && $train->doc_id) { $train->trained_at = null; $train->save(); $this->service->updateAgentWithKnowledgebase($train->chatbot_id); $this->service->deleteKnowledgebase($train->doc_id); } $train->delete(); } return response()->json([ 'message' => 'Deleted successfully', 'status' => 200, ]); } /** * store file train data on database */ public function trainFile(FileRequest $request): JsonResponse|AnonymousResourceCollection { if (Helper::appIsDemo()) { return response()->json([ 'type' => 'error', 'message' => 'This feature is disabled in Demo version.', ], 403); } $chatbot = $this->service->fetchVoiceChatbot(); /** @var \Illuminate\Http\UploadedFile $file */ $file = $request->file('file'); $defaultDisk = 'public'; $path = $file->store('chatbot-voice', ['disk' => $defaultDisk]); VoiceChatBotTrain::create([ 'type' => TrainTypeEnum::file, 'name' => pathinfo($file->getClientOriginalName(), PATHINFO_FILENAME), 'user_id' => Auth::id(), 'chatbot_id' => $chatbot->getKey(), 'file' => $path, ]); return ChatbotTrainResource::collection( $chatbot->trainData()->whereNotNull('file')->get() ); } /** * store text train data on database */ public function trainText(TextRequest $request): JsonResponse|AnonymousResourceCollection { if (Helper::appIsDemo()) { return response()->json([ 'type' => 'error', 'message' => 'This feature is disabled in Demo version.', ], 403); } $chatbot = $this->service->fetchVoiceChatbot(); VoiceChatBotTrain::create([ 'type' => TrainTypeEnum::text, 'user_id' => Auth::id(), 'chatbot_id' => $chatbot->getKey(), 'name' => $request->validated('title'), 'text' => $request->validated('content'), ]); return ChatbotTrainResource::collection( $chatbot->trainData() ->wherenull('file') ->whereNull('url')->get() ); } /** * store url train data on database */ public function trainUrl(TrainUrlRequest $request): JsonResponse|AnonymousResourceCollection { if (Helper::appIsDemo()) { return response()->json([ 'type' => 'error', 'message' => 'This feature is disabled in Demo version.', ], 403); } $chatbot = $this->service->fetchVoiceChatbot(); app(LinkParser::class) ->setBaseUrl($request->validated('url')) ->crawl((bool) $request->validated('single')) ->insertEmbeddings($chatbot); return ChatbotTrainResource::collection( $chatbot->trainData()->whereNotNull('url')->get() ); } /** * train on elevenlabs */ public function generateEmbedding(TrainRequest $request): JsonResponse|AnonymousResourceCollection { if (Helper::appIsDemo()) { return response()->json([ 'type' => 'error', 'message' => 'This feature is disabled in Demo version.', ], 403); } $chatbot = $this->service->fetchVoiceChatbot(); ini_set('max_execution_time', -1); $data = $request->validated('data'); $trains = VoiceChatBotTrain::query() ->whereNull('trained_at') ->whereIn('id', $data) ->get(); foreach ($trains as $train) { $content = ''; if ($train->type == 'text') { $content = $train->text; } elseif ($train->type == 'url') { $content = $train->url; } elseif ($train->type == 'file') { $defaultDisk = 'public'; $path = $train->file; $storagePath = config('filesystems.disks.' . $defaultDisk . '.root') . '/' . $path; $content = new UploadedFile( $storagePath, basename($path), mime_content_type($storagePath), null, true ); } $res = $this->service->addKnowledgebase($train->type, $content, $train->name); if ($res->getData()->status == 'success') { $train->update([ 'name' => $res->getData()->resData?->name, 'doc_id' => $res->getData()->resData?->id, 'trained_at' => now(), ]); } } $this->service->updateAgentWithKnowledgebase($trains[0]->chatbot_id); return ChatbotTrainResource::collection($chatbot->trainData()->whereIn('id', $data)->get()); } } ������������������System/Http/Requests/Train/TrainUrlRequest.php������������������������������������������������������0000644�����������������00000000524�15266620645�0015476 0����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?php namespace App\Extensions\ElevenLabsVoiceChat\System\Http\Requests\Train; use Illuminate\Foundation\Http\FormRequest; class TrainUrlRequest extends FormRequest { public function rules(): array { return [ 'url' => ['required', 'url'], 'single' => ['required', 'in:1,0'], ]; } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������System/Http/Requests/Train/TextRequest.php����������������������������������������������������������0000644�����������������00000000525�15266620645�0014663 0����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?php namespace App\Extensions\ElevenLabsVoiceChat\System\Http\Requests\Train; use Illuminate\Foundation\Http\FormRequest; class TextRequest extends FormRequest { public function rules(): array { return [ 'title' => ['required', 'string'], 'content' => ['required', 'string'], ]; } } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������System/Http/Requests/Train/FileRequest.php����������������������������������������������������������0000644�����������������00000000434�15266620645�0014615 0����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?php namespace App\Extensions\ElevenLabsVoiceChat\System\Http\Requests\Train; use Illuminate\Foundation\Http\FormRequest; class FileRequest extends FormRequest { public function rules(): array { return [ 'file' => 'required|file', ]; } } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������System/Http/Requests/Train/DataRequest.php����������������������������������������������������������0000644�����������������00000001070�15266620645�0014604 0����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?php namespace App\Extensions\ElevenLabsVoiceChat\System\Http\Requests\Train; use App\Extensions\ElevenLabsVoiceChat\System\Enum\TrainTypeEnum; use App\Extensions\ElevenLabsVoiceChat\System\Models\VoiceChatBot; use Illuminate\Foundation\Http\FormRequest; class DataRequest extends FormRequest { public function rules(): array { return [ 'id' => 'required|exists:' . (new VoiceChatBot)->getTable() . ',id', 'type' => ['sometimes', 'nullable', 'in:' . implode(',', TrainTypeEnum::toArray())], ]; } } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������System/Http/Requests/Train/TrainRequest.php���������������������������������������������������������0000644�����������������00000000700�15266620645�0015007 0����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?php namespace App\Extensions\ElevenLabsVoiceChat\System\Http\Requests\Train; use App\Extensions\ElevenLabsVoiceChat\System\Models\VoiceChatBotTrain; use Illuminate\Foundation\Http\FormRequest; class TrainRequest extends FormRequest { public function rules(): array { return [ 'data' => 'required|array', 'data.*' => 'required|exists:' . (new VoiceChatBotTrain)->getTable() . ',id', ]; } } ����������������������������������������������������������������System/Http/Requests/VoiceChatbotUpdateRequest.php��������������������������������������������������0000644�����������������00000001501�15266620645�0016372 0����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?php namespace App\Extensions\ElevenLabsVoiceChat\System\Http\Requests; use Illuminate\Foundation\Http\FormRequest; class VoiceChatbotUpdateRequest extends FormRequest { /** * Determine if the user is authorized to make this request. */ public function authorize(): bool { return true; } /** * Get the validation rules that apply to the request. * * @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string> */ public function rules(): array { return [ 'welcome_message' => ['required', 'string'], 'voice_id' => ['required', 'string'], 'instruction' => ['required', 'string'], 'language' => ['sometimes', 'nullable', 'string'], ]; } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������System/Http/Resources/ChatbotTrainResource.php������������������������������������������������������0000644�����������������00000001203�15266620645�0015534 0����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?php declare(strict_types=1); namespace App\Extensions\ElevenLabsVoiceChat\System\Http\Resources; use Illuminate\Http\Request; use Illuminate\Http\Resources\Json\JsonResource; class ChatbotTrainResource extends JsonResource { public function toArray(Request $request): array { return [ 'id' => $this->id, 'type' => $this->type, 'file' => $this->file, 'url' => $this->url, 'text' => $this->url, 'name' => $this->name, 'status' => $this->trained_at ? 'Trained' : 'Not Trained', ]; } } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������resources/views/particles/text-tab.blade.php��������������������������������������������������������0000644�����������������00000012505�15266620645�0015227 0����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<div class="col-start-1 col-end-1 row-start-1 row-end-1" x-show="activeTab === 'text'" x-transition.opacity.150ms > <form class="flex flex-col gap-5" action="{{ route('dashboard.admin.voice-chatbot.train.text') }}" @submit.prevent="ev => addText(ev, 'text')" > <x-form-step step="1" label="{{ __('Add Text') }}" /> <x-forms.input name="title" size="lg" placeholder="{{ __('Type your title here') }}" label="{{ __('Title') }}" ::value="editingItem.title" /> <x-forms.input name="content" placeholder="{{ __('Type your text here') }}" label="{{ __('Text') }}" rows="6" type="textarea" size="lg" ::value="editingItem.content" /> <x-button class="group w-full" variant="success" type="submit" ::disabled="fetching" > <x-tabler-plus class="size-4" x-show="!editingItem.id" /> <span x-text="editingItem.id ? '{{ __('Update') }}' : '{{ __('Add') }}'"></span> </x-button> </form> <form class="mt-10 flex flex-col gap-5" action="{{ route('dashboard.admin.voice-chatbot.train.generate') }}" @submit.prevent="trainEmbeddings" > <x-form-step step="2" label="{{ __('Manage Content') }}" x-show="embeddings.filter(e => e.type === 'text').length" > <button class="group ms-auto text-2xs font-semibold" type="button" @click="toggleSelectAll" > <span class="group-[&.has-selected]:hidden"> @lang('Select All') </span> <span class="hidden group-[&.has-selected]:block"> @lang('Deselect All') </span> </button> </x-form-step> <div class="space-y-4"> <template x-for="embedding in embeddings.filter(e => e.type === 'text')"> <div class="flex items-center justify-between rounded-lg border p-1.5" :key="'text-item-' + embedding.id" > <x-forms.input class:container="grow" class:custom-wrap="size-7" class:label="text-foreground" data-type="text" ::id="'train-text-item-' + embedding.id" name="embedding-item" type="checkbox" ::value="embedding.id" ::checked="embedding.status === 'Trained'" x-init="$el.closest('label').setAttribute('for', 'train-text-item-' + embedding.id);" custom > <x-slot:label> <span x-text="embedding.name"></span> </x-slot:label> </x-forms.input> <div class="flex items-center justify-between gap-1"> <x-badge class="whitespace-nowrap text-2xs hover:translate-y-0 hover:shadow-none" ::class="{ '!bg-green-500/15': embedding.status === 'Trained', '!text-green-500': embedding .status === 'Trained' }" > <span x-text="embedding.status"></span> </x-badge> {{-- <x-button class="size-7 inline-flex items-center justify-center" variant="outline" size="none" @click.prevent="setEditingItem(embedding.id)" > <x-tabler-pencil class="size-5" /> <span class="sr-only">{{ __('Edit') }}</span> </x-button> --}} <x-button class="inline-flex items-center justify-center text-red-600" variant="link" size="none" @click.prevent="deleteEmbedding(embedding.id)" ::disabled="fetching" > <x-tabler-circle-minus class="size-7" stroke-width="1.5" /> <span class="sr-only"> {{ __('Delete') }} </span> </x-button> </div> </div> </template> <x-button class="!mt-8 w-full" size="lg" type="submit" x-show="embeddings.filter(e => e.type === 'text').length" ::disabled="fetching" > @lang('Train') </x-button> </div> </form> </div> �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������resources/views/particles/pdf-tab.blade.php���������������������������������������������������������0000644�����������������00000013476�15266620645�0015024 0����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<div class="col-start-1 col-end-1 row-start-1 row-end-1" x-show="activeTab === 'pdf'" x-transition.opacity.150ms > <form class="mb-4 flex w-full flex-col gap-5" @submit.prevent="uploadFile" action="{{ route('dashboard.admin.voice-chatbot.train.file') }}" > @csrf <x-form-step step="1" label="{{ __('Add File') }}" /> <label class="group flex min-h-56 w-full cursor-pointer flex-col items-center justify-center rounded-lg border border-dashed border-foreground/10 bg-background text-center text-[12px] transition-colors hover:bg-background/80" for="train-file" > <div class="flex flex-col items-center justify-center py-6"> <x-tabler-circle-plus class="mb-3.5 size-11" stroke-width="1" x-show="!uploading" /> <x-tabler-refresh class="mb-3.5 size-11 animate-spin" stroke-width="1" x-show="uploading" /> <p class="mb-1 font-semibold" data-original-text="{{ __('UPLOAD PDF, XLSX, CSV') }}" x-ref="fileName" > {{ __('UPLOAD PDF, XLSX, CSV') }} </p> <p class="mb-0" x-text="!uploading ? '{{ __('Upload a File (Max: 25Mb)') }}' : '{{ __('UPLOADING...') }}'" > {{ __('Upload a File (Max: 25Mb)') }} </p> </div> <input class="hidden" id="train-file" name="file" accept="file/*" type="file" @change="if ($event.target?.files[0]) $refs.fileName.innerText = $event.target.files[0].name" /> </label> <x-button class="group w-full" variant="success" type="submit" ::disabled="uploading || fetching" > <x-tabler-plus class="size-4" /> {{ 'Upload' }} </x-button> </form> <form class="mt-14" action="{{ route('dashboard.admin.voice-chatbot.train.generate') }}" @submit.prevent="trainEmbeddings" > @csrf <x-form-step class="mb-6" step="2" label="{{ __('Select Pages') }}" x-show="embeddings.filter(e => e.type === 'file').length" > <button class="group ms-auto text-2xs font-semibold" type="button" @click="toggleSelectAll" > <span class="group-[&.has-selected]:hidden"> @lang('Select All') </span> <span class="hidden group-[&.has-selected]:block"> @lang('Deselect All') </span> </button> </x-form-step> <div class="space-y-4"> <template x-for="embedding in embeddings.filter(e => e.type === 'file')"> <div class="flex items-center justify-between rounded-lg border p-1.5" :key="'file-item-' + embedding.id" > <x-forms.input class:container="grow" class:custom-wrap="size-7" class:label="text-foreground" data-type="file" ::id="'train-file-item-' + embedding.id" name="embedding-item" type="checkbox" ::value="embedding.id" ::checked="embedding.status === 'Trained'" x-init="$el.closest('label').setAttribute('for', 'train-file-item-' + embedding.id);" custom > <x-slot:label> <span x-text="embedding.name"></span> </x-slot:label> </x-forms.input> <div class="flex items-center justify-between gap-1"> <x-badge class="whitespace-nowrap text-2xs hover:translate-y-0 hover:shadow-none" ::class="{ '!bg-green-500/15': embedding.status === 'Trained', '!text-green-500': embedding .status === 'Trained' }" > <span x-text="embedding.status"></span> </x-badge> <x-button class="inline-flex items-center justify-center text-red-600" variant="link" size="none" @click.prevent="deleteEmbedding(embedding.id)" ::disabled="fetching" > <x-tabler-circle-minus class="size-7" stroke-width="1.5" /> <span class="sr-only"> {{ __('Delete') }} </span> </x-button> </div> </div> </template> <x-button class="!mt-8 w-full" size="lg" type="submit" x-show="embeddings.filter(e => e.type === 'file').length" ::disabled="fetching" > @lang('Train') </x-button> </div> </form> </div> ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������resources/views/particles/web-site-tab.blade.php����������������������������������������������������0000644�����������������00000014203�15266620645�0015757 0����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<div class="col-start-1 col-end-1 row-start-1 row-end-1" x-show="activeTab === 'url'" x-transition.opacity.150ms > <form class="flex flex-col gap-5" @submit.prevent="addUrl" action="{{ route('dashboard.admin.voice-chatbot.train.url') }}" > @csrf <x-form-step step="1" label="{{ __('Add URL') }}" /> <div class="flex flex-wrap gap-x-6 gap-y-2 text-2xs"> <label class="cursor-pointer" for="website" > <input class="peer invisible size-0" id="website" value="0" type="radio" name="single" checked > <span class="inline-block opacity-25 peer-checked:underline peer-checked:underline-offset-2 peer-checked:opacity-100" > @lang('Website') </span> </label> <label class="cursor-pointer" for="single" > <input class="peer invisible size-0" id="single" value="1" type="radio" name="single" > <span class="inline-block opacity-25 peer-checked:underline peer-checked:underline-offset-2 peer-checked:opacity-100" > @lang('Single URL') </span> </label> </div> <div class="relative"> <x-forms.input id="url" size="lg" name="url" placeholder="https://example.com" /> <x-button class="group absolute end-2 top-1/2 size-11 -translate-y-1/2 text-primary hover:-translate-y-1/2 hover:rotate-45 hover:scale-110 focus-visible:-translate-y-1/2 focus-visible:rotate-45 focus-visible:scale-110" variant="link" size="none" type="submit" ::disabled="fetching" > <x-tabler-refresh class="size-5" stroke-width="2.2" ::class="{ 'animate-spin': fetching }" /> <span class="sr-only"> @lang('Fetch') </span> </x-button> </div> </form> <form class="mt-14" action="{{ route('dashboard.admin.voice-chatbot.train.generate') }}" @submit.prevent="trainEmbeddings" > @csrf <x-form-step class="mb-6" step="2" label="{{ __('Select Pages') }}" x-show="embeddings.filter(e => e.type === 'url').length" > <button class="group ms-auto text-2xs font-semibold" type="button" @click="toggleSelectAll" > <span class="group-[&.has-selected]:hidden"> @lang('Select All') </span> <span class="hidden group-[&.has-selected]:block"> @lang('Deselect All') </span> </button> </x-form-step> <div class="space-y-4"> <template x-for="embedding in embeddings.filter(e => e.type === 'url')" :key="'url-item-' + embedding.id" > <div class="flex items-center justify-between rounded-lg border p-1.5"> <x-forms.input class:container="grow" class:custom-wrap="size-7" class:label="text-foreground" data-type="url" ::id="'train-url-item-' + embedding.id" name="embedding-item" type="checkbox" ::value="embedding.id" ::checked="embedding.status === 'Trained'" x-init="$el.closest('label').setAttribute('for', 'train-url-item-' + embedding.id);" custom > <x-slot:label> <span x-text="embedding.name || embedding.url"></span> </x-slot:label> </x-forms.input> <div class="flex items-center justify-between gap-1"> <x-badge class="whitespace-nowrap text-2xs hover:translate-y-0 hover:shadow-none" ::class="{ '!bg-green-500/15': embedding.status === 'Trained', '!text-green-500': embedding .status === 'Trained' }" > <span x-text="embedding.status"></span> </x-badge> <x-button class="inline-flex items-center justify-center text-red-600" variant="link" size="none" @click.prevent="deleteEmbedding(embedding.id)" ::disabled="fetching" > <x-tabler-circle-minus class="size-7" stroke-width="1.5" /> <span class="sr-only"> {{ __('Delete') }} </span> </x-button> </div> </div> </template> <x-button class="!mt-8 w-full" size="lg" type="submit" x-show="embeddings.filter(e => e.type === 'url').length" ::disabled="fetching" > @lang('Train') </x-button> </div> </form> </div> ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������resources/views/index.blade.php���������������������������������������������������������������������0000644�����������������00000060161�15266620645�0012621 0����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������@php $tabs = [ 'url' => [ 'title' => __('Website'), ], 'pdf' => [ 'title' => __('File'), ], 'text' => [ 'title' => __('Text'), ], ]; $title = __('Voice Chatbot Training'); @endphp @extends('panel.layout.settings') @section('title', $title) @section('titlebar_actions', '') @section('settings') @if (!empty($item)) <h2 class="mb-9 font-semibold"> @lang('Configure a chatbot that interacts with your users, ensuring it delivers accurate information.') </h2> <form class="mb-4 flex flex-col flex-wrap gap-5" id="configure_bot_form" method="post" action="{{ route('dashboard.admin.voice-chatbot.update') }}" x-ref="form" x-data="elevenlabsVoiceChatbot" > @method('PUT') @csrf <div> <x-forms.input class:label="text-heading-foreground" label="{{ __('Welcome Message') }}" placeholder="{{ __('Enter welcome message') }}" name="welcome_message" size="lg" value="{{ $item->welcome_message }}" /> <template x-for="(error, index) in formErrors.welcome_message" :key="'error-' + index" > <div class="mt-2 text-2xs/5 font-medium text-red-500"> <p x-text="error"></p> </div> </template> </div> <div> <x-forms.input class:label="text-heading-foreground" label="{{ __('Chatbot Instructions') }}" placeholder="{{ __('Explain chatbot role') }}" name="instruction" size="lg" type="textarea" rows="5" > {{ $item->instruction }} </x-forms.input> <template x-for="(error, index) in formErrors.instruction" :key="'error-' + index" > <div class="mt-2 text-2xs/5 font-medium text-red-500"> <p x-text="error"></p> </div> </template> </div> <div> <x-forms.input class:label="text-heading-foreground" class="max-sm:text-[9px]" label="{{ __('Voice') }}" name="voice_id" value="{{ $item->voice_id }}" size="lg" type="select" > @foreach ($voices as $voice) <option value="{{ $voice->voice_id }}" {{ $voice->voice_id == $item->voice_id ? 'selected' : '' }} > {{ $voice->name . ' (' . implode(', ', (array) $voice->labels) . ')' }} </option> @endforeach </x-forms.input> <template x-for="(error, index) in formErrors.voice_id" :key="'error-' + index" > <div class="mt-2 text-2xs/5 font-medium text-red-500"> <p x-text="error"></p> </div> </template> </div> <div> <x-forms.input class:label="text-heading-foreground" label="{{ __('Language') }}" name="language" value="{{ $item->language }}" size="lg" type="select" > @foreach (LaravelLocalization::getSupportedLocales() as $localeCode => $properties) @if (in_array($localeCode, explode(',', $settings_two->languages), true)) <option value="{{ $localeCode }}" {{ $item->language == $localeCode ? 'selected' : '' }} > {{ $properties['name'] }} </option> @endif @endforeach </x-forms.input> <template x-for="(error, index) in formErrors.language" :key="'error-' + index" > <div class="mt-2 text-2xs/5 font-medium text-red-500"> <p x-text="error"></p> </div> </template> </div> <x-button class="!mt-8 w-full" data-form="#configure_bot_form" size="lg" type="button" @click.prevent="submitForm" ::disabled="submitting" > {{ __('Submit') }} </x-button> </form> <h2 class="my-9 font-semibold"> @lang('Simply select the source and MagicAI will do the rest to train your GPT in seconds.') </h2> <div x-data="trainVoiceChatbotData"> <nav class="mb-14 flex flex-col justify-between gap-2 rounded-xl bg-foreground/5 px-2.5 py-1.5 font-medium leading-snug sm:flex-row sm:rounded-full"> @foreach ($tabs as $tab => $tabData) <button class="'rounded-xl sm:rounded-full' grow px-5 py-2.5 text-foreground transition-colors hover:bg-foreground/5 [&.lqd-is-active]:bg-white [&.lqd-is-active]:text-black [&.lqd-is-active]:shadow-[0_2px_13px_rgba(0,0,0,0.1)]" type="button" @click="setActiveTab('{{ $tab }}')" :class="{ 'lqd-is-active': activeTab === '{{ $tab }}' }" > @lang($tabData['title']) </button> @endforeach </nav> <div> @include('elevenlabs-voice-chat::particles.web-site-tab') @include('elevenlabs-voice-chat::particles.pdf-tab') @include('elevenlabs-voice-chat::particles.text-tab') </div> </div> <div class="crawler-spinner fixed inset-0 z-50 mt-5 hidden bg-background/65 text-center backdrop-blur-sm"> <div class="container"> <div class="flex min-h-screen flex-col items-center justify-center py-7"> <div class="flex w-full flex-col items-center gap-11 md:w-5/12 lg:w-3/12"> <h5 class="text-lg"> @lang('Almost Done!') </h5> <x-tabler-loader-2 class="mx-auto size-28 animate-spin" role="status" /> <div class="space-y-3"> <p class="font-heading text-2xl font-bold text-heading-foreground"> @lang('Training GPT...') </p> <p> @lang('We’re training your custom GPT with the related resources. This may take a few minutes.') </p> </div> </div> </div> </div> </div> @push('script') <script src="{{ custom_theme_url('assets/js/panel/admin.voice-chatbot.js?v=' . time()) }}"></script> <script> (() => { document.addEventListener('alpine:init', () => { Alpine.data('trainVoiceChatbotData', () => ({ activeTab: 'url', fetching: false, uploading: false, embeddings: [], editingItem: {}, activeChatbot: @json($item), init() { this.$data.trainVoiceChatbotData = this; }, setActiveTab(tab) { if (tab === this.activeTab) return; this.activeTab = tab; }, toggleSelectAll(event) { const btn = event.currentTarget; const checkboxes = document.getElementsByName('embedding-item'); const relevantCheckboxes = Array.from(checkboxes).filter(el => el .getAttribute('data-type') === this.activeTab); const allChecked = relevantCheckboxes.every(el => el.checked); relevantCheckboxes.forEach(el => el.checked = !allChecked); if (relevantCheckboxes.some(el => el.checked)) { btn.classList.add('has-selected'); } else { btn.classList.remove('has-selected'); } }, async fetchEmbeddings() { if (!this.activeChatbot || this.fetching) return; this.fetching = true; const res = await fetch( `{{ route('dashboard.admin.voice-chatbot.train.data') }}?id=${this.activeChatbot.id}` ); if (!res.ok) { this.fetching = false; toastr.error( '{{ $app_is_demo ? __('This feature is disabled in Demo version.') : __('Failed to fetch embeddings') }}' ); return; } const data = await res.json(); const embeddings = data.data; if (!embeddings) { this.fetching = false; toastr.error('{{ __('Failed to fetch embeddings') }}'); return; } this.embeddings = embeddings; this.fetching = false; }, async trainEmbeddings(event) { if (this.fetching) return; this.fetching = true; const form = event.target; const checkboxes = form.elements['embedding-item']; const embdeddingData = { id: this.activeChatbot.id, data: (checkboxes.length ? Array.from(checkboxes) : [ checkboxes ]).filter(el => el.checked).map(el => el .value), }; const res = await fetch(form.action, { method: 'POST', headers: { 'Content-Type': 'application/json', 'Accept': 'application/json', 'X-CSRF-TOKEN': '{{ csrf_token() }}', }, body: JSON.stringify(embdeddingData), }); if (!res.ok) { this.fetching = false; const errorData = await res.json(); toastr.error(errorData.message || '{{ __('Failed to train embeddings') }}'); return; } const data = await res.json(); const embeddings = data.data; if (!embeddings) { this.fetching = false; toastr.error('{{ __('Failed to train embeddings') }}'); return; } let trainedAll = true; this.embeddings = this.embeddings.map(embedding => { const newEmbedding = embeddings.find(e => e.id === embedding .id); if (newEmbedding) { if (newEmbedding.status == 'Not Trained') { trainedAll = false; } return newEmbedding; } return embedding; }); if (trainedAll) { toastr.success('{{ __('Training done successfully') }}'); } else { toastr.info('{{ __('Training failed') }}'); } this.fetching = false; }, async deleteEmbedding(embeddingId) { if (!embeddingId || this.fetching) return; this.fetching = true; if (!confirm( `{{ __('Are you sure you want to delete this embedding?') }}` )) { this.fetching = false; return; } const res = await fetch( '{{ route('dashboard.admin.voice-chatbot.train.delete') }}', { method: 'DELETE', headers: { 'Content-Type': 'application/json', 'Accept': 'application/json', 'X-CSRF-TOKEN': '{{ csrf_token() }}', }, body: JSON.stringify({ id: this.activeChatbot.id, data: [embeddingId], }), }); if (!res.ok) { this.fetching = false; toastr.error( '{{ $app_is_demo ? __('This feature is disabled in Demo version.') : __('Failed to delete embedding') }}' ); return; } const data = await res.json(); if (data.status === 200 && data.message) { toastr.success(data.message); } this.embeddings = this.embeddings.filter(embedding => embedding.id !== embeddingId); this.fetching = false; }, setEditingItem(id) { this.editingItem = this.embeddings.find(embedding => embedding.id === id) || {}; }, // Start Train URL Tab async addUrl(event) { if (this.fetching) return; this.fetching = true; const form = event.target; const formData = new FormData(form); formData.append('id', this.activeChatbot.id); const res = await fetch(form.action, { method: 'POST', headers: { 'X-CSRF-TOKEN': '{{ csrf_token() }}', 'Accept': 'application/json', }, body: formData, }); if (!res.ok) { this.fetching = false; console.log('add'); toastr.error( '{{ $app_is_demo ? __('This feature is disabled in Demo version.') : __('Failed to fetch urls') }}' ); return; } const data = await res.json(); const websites = data.data; if (!websites) { this.fetching = false; toastr.error('{{ __('Failed to fetch urls') }}'); return; } this.embeddings = this.embeddings .filter(embedding => embedding.type !== 'url') .concat(websites); this.fetching = false; }, // End Train URL Tab // Start Train File Tab async uploadFile(event) { this.uploading = this.fetching = true; const form = event.target; const formData = new FormData(form); // Try getting files from original input first let files = []; const fileInput = form.elements.file; if (fileInput && fileInput.files && fileInput.files.length > 0) { files = Array.from(fileInput.files); } else if (window.selectedMediaData && window.selectedMediaData.has('file')) { // Fallback: Use cached media data from Media Manager const items = window.selectedMediaData.get('file'); if (items?.length > 0) { for (const [index, item] of items.entries()) { try { const response = await fetch(item.url); const blob = await response.blob(); const file = new File([blob], item.title || `file-${index}`, { type: blob.type, lastModified: Date.now() }); formData.append('file', file); } catch (error) { console.error(`Failed to load file from URL: ${item.url}`, error); } } } } // If no files found at all if (!formData.getAll('file').length) { this.uploading = this.fetching = false; toastr.error('{{ __('Please select a file') }}'); return; } // Append chatbot ID formData.append('id', this.activeChatbot.id); // Submit const res = await fetch(form.action, { method: 'POST', headers: { 'X-CSRF-TOKEN': '{{ csrf_token() }}', 'Accept': 'application/json', }, body: formData, }); if (!res.ok) { this.uploading = this.fetching = false; toastr.error( '{{ $app_is_demo ? __("This feature is disabled in Demo version.") : __("Failed to upload file") }}' ); return; } const data = await res.json(); const filesResponse = data.data; if (!filesResponse) { this.uploading = this.fetching = false; toastr.error('{{ __("Failed to upload file") }}'); return; } this.embeddings = this.embeddings .filter(embedding => embedding.type !== 'file') .concat(filesResponse); // Reset UI this.$refs.fileName.innerText = this.$refs.fileName.getAttribute('data-original-text'); this.$refs.fileName.value = null; this.$refs.fileName.files = new DataTransfer().files; this.uploading = this.fetching = false; // Optional: Clear selected media after successful upload window.selectedMediaData.delete('file'); }, // End Train File Tab // Start Train Text & QA Tab async addText(event, textOrQA = 'text') { this.fetching = true; const form = event.target; const formData = new FormData(form); const title = formData.get(textOrQA === 'text' ? 'title' : 'question'); const content = formData.get(textOrQA === 'text' ? 'content' : 'answer'); if (!title || !content || !title.trim() || !content.trim()) { toastr.error('{{ __('Please fill in the title and content') }}'); return; } formData.append('id', this.activeChatbot.id); const res = await fetch(form.action, { method: 'POST', headers: { 'X-CSRF-TOKEN': '{{ csrf_token() }}', 'Accept': 'application/json', }, body: formData, }); if (!res.ok) { this.fetching = false; toastr.error( '{{ $app_is_demo ? __('This feature is disabled in Demo version.') : __('Failed to add the new item') }}' ); return; } const data = await res.json(); const items = data.data; if (!items) { this.fetching = false; toastr.error('{{ __('Failed to add the new item') }}'); return; } this.embeddings = this.embeddings .filter(embedding => embedding.type !== textOrQA) .concat(items); event.target.reset(); event.target.elements[textOrQA === 'text' ? 'title' : 'question'] .focus(); this.fetching = false; }, })); }); })(); </script> @endpush @else <div class="flex flex-1 items-center justify-center"> <h2 class="text-center"> {{ __('Something went wrong! Please check if you configured Elevenlabs API Key correctly and credits.') }} </h2> </div> @endif @endsection ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������resources/views/components/chat-button.blade.php����������������������������������������������������0000644�����������������00000031762�15266620645�0016134 0����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������@php $compact = $compact ?? false; $visible = $visible ?? $compact; $messages = isset($messages) ? $messages : []; $category_slug = $category_slug ?? ''; @endphp @if (setting('realtime_voice_chat', 0)) <div @class([ 'pointer-events-auto flex items-center max-md:flex-col max-md:items-start max-md:gap-4' => $compact, 'grid place-items-center absolute inset-0 pointer-events-none' => !$compact, ])> @if (setting('default_voice_chat_engine', 'openai') == 'elevenlabs' && !empty($elevenlabsAgentId)) <x-button data-compact="{{ $compact ? 'true' : 'false' }}" @class([ 'lqd-realtime-chat-button group/realtime pointer-events-auto z-2', 'data-[compact=true]:[&.conversation-not-started]:hidden data-[compact=false]:[&.conversation-started]:hidden' => !$visible, 'conversation-not-started' => count($messages) <= 1, 'conversation-started' => count($messages) > 1, 'md:bg-secondary md:text-secondary-foreground md:hover:bg-primary md:hover:text-primary-foreground [&.active]:hover:bg-red-500 [&.active]:hover:text-white' => $compact, 'flex size-48 flex-col items-center gap-3 bg-background/80 backdrop-blur-lg text-center text-heading-foreground shadow-[0_2px_55px_hsl(var(--heading-foreground)/10%)] hover:translate-y-0 hover:scale-105 hover:bg-background hover:text-heading-foreground active:scale-95 md:size-[200px] [&.active]:invisible [&.active]:scale-90 [&.active]:opacity-0 hover:shadow-[0_5px_65px_hsl(var(--heading-foreground)/7%)] motion-scale-in-[0.8] motion-blur-in-[12px] motion-duration-[0.45s] motion-ease-spring-bouncier' => !$compact, ]) size="none" variant="ghost" x-data="elevenlabsRealtime('{{ $elevenlabsAgentId }}')" @click.prevent="!$store.realtimeChatStatus.active ? start() : stop()" @audio-vis.window="$data[$event.detail.action]()" > <span @class([ 'grid place-content-center place-items-center', 'size-6 md:size-10' => $compact, 'size-14' => !$compact, ])> <svg @class([ 'col-start-1 col-end-1 row-start-1 row-end-1 transition-all', 'size-14 group-hover/realtime:scale-105 duration-200' => !$compact, ]) width="22" height="22" viewBox="0 0 22 22" fill="currentColor" xmlns="http://www.w3.org/2000/svg" > <defs> <linearGradient id="paint0_linear_8997_923" x1="0.265625" y1="11.905" x2="45.8863" y2="52.1425" gradientUnits="userSpaceOnUse" > <stop stop-color="hsl(var(--gradient-from))" /> <stop offset="0.3" stop-color="hsl(var(--gradient-via))" /> <stop offset="0.7" stop-color="hsl(var(--gradient-to))" /> </linearGradient> </defs> <g @if (!$compact) fill="url(#paint0_linear_8997_923)" @endif> <path d="M11.75 7C11.75 6.58579 11.4142 6.25 11 6.25C10.5858 6.25 10.25 6.58579 10.25 7V15C10.25 15.4142 10.5858 15.75 11 15.75C11.4142 15.75 11.75 15.4142 11.75 15V7Z" /> <path d="M8.75 8C8.75 7.58579 8.41421 7.25 8 7.25C7.58579 7.25 7.25 7.58579 7.25 8L7.25 14C7.25 14.4142 7.58579 14.75 8 14.75C8.41421 14.75 8.75 14.4142 8.75 14V8Z" /> <path d="M14.75 8C14.75 7.58579 14.4142 7.25 14 7.25C13.5858 7.25 13.25 7.58579 13.25 8V14C13.25 14.4142 13.5858 14.75 14 14.75C14.4142 14.75 14.75 14.4142 14.75 14V8Z" /> <path d="M5.75 10C5.75 9.58579 5.41421 9.25 5 9.25C4.58579 9.25 4.25 9.58579 4.25 10V12C4.25 12.4142 4.58579 12.75 5 12.75C5.41421 12.75 5.75 12.4142 5.75 12V10Z" /> <path d="M17.75 10C17.75 9.58579 17.4142 9.25 17 9.25C16.5858 9.25 16.25 9.58579 16.25 10V12C16.25 12.4142 16.5858 12.75 17 12.75C17.4142 12.75 17.75 12.4142 17.75 12V10Z" /> <path fill-rule="evenodd" clip-rule="evenodd" d="M11 0.25C5.06294 0.25 0.25 5.06294 0.25 11C0.25 16.9371 5.06294 21.75 11 21.75C16.9371 21.75 21.75 16.9371 21.75 11C21.75 5.06294 16.9371 0.25 11 0.25ZM1.75 11C1.75 5.89137 5.89137 1.75 11 1.75C16.1086 1.75 20.25 5.89137 20.25 11C20.25 16.1086 16.1086 20.25 11 20.25C5.89137 20.25 1.75 16.1086 1.75 11Z" /> </g> </svg> <svg class="invisible col-start-1 col-end-1 row-start-1 row-end-1 -rotate-12 scale-50 opacity-0 transition-all duration-200 group-[&.active]/realtime:visible group-[&.active]/realtime:rotate-0 group-[&.active]/realtime:scale-100 group-[&.active]/realtime:opacity-100" xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 24 24" stroke-width="1" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" > <path d="M7 5l10 14" /> </svg> </span> @if ($compact) <span class="md:hidden"> @lang('Real-Time Chat') </span> @else <span class="text-xs font-medium"> @lang('Start Voice Chat') </span> @endif </x-button> @else <x-button data-compact="{{ $compact ? 'true' : 'false' }}" @class([ 'lqd-realtime-chat-button group/realtime pointer-events-auto z-2', 'data-[compact=true]:[&.conversation-not-started]:hidden data-[compact=false]:[&.conversation-started]:hidden' => !$visible, 'conversation-not-started' => count($messages) <= 1, 'conversation-started' => count($messages) > 1, 'md:bg-secondary md:text-secondary-foreground md:hover:bg-primary md:hover:text-primary-foreground [&.active]:hover:bg-red-500 [&.active]:hover:text-white' => $compact, 'flex size-48 flex-col items-center gap-3 bg-background/80 backdrop-blur-lg text-center text-heading-foreground shadow-[0_2px_55px_hsl(var(--heading-foreground)/10%)] hover:translate-y-0 hover:scale-105 hover:bg-background hover:text-heading-foreground active:scale-95 md:size-[200px] [&.active]:invisible [&.active]:scale-90 [&.active]:opacity-0 hover:shadow-[0_5px_65px_hsl(var(--heading-foreground)/7%)] motion-scale-in-[0.8] motion-blur-in-[12px] motion-duration-[0.45s] motion-ease-spring-bouncier' => !$compact, ]) size="none" variant="ghost" x-data="openaiRealtime('{{ $apikeyPart1 }}', '{{ $apikeyPart2 }}', '{{ $apikeyPart3 }}')" @click.prevent="!$store.realtimeChatStatus.active ? start() : stop()" @audio-vis.window="$data[$event.detail.action]()" > <span @class([ 'grid place-content-center place-items-center', 'size-6 md:size-10' => $compact, 'size-14' => !$compact, ])> <svg @class([ 'col-start-1 col-end-1 row-start-1 row-end-1 transition-all', 'size-14 group-hover/realtime:scale-105 duration-200' => !$compact, ]) width="22" height="22" viewBox="0 0 22 22" fill="currentColor" xmlns="http://www.w3.org/2000/svg" > <defs> <linearGradient id="paint0_linear_8997_923" x1="0.265625" y1="11.905" x2="45.8863" y2="52.1425" gradientUnits="userSpaceOnUse" > <stop stop-color="hsl(var(--gradient-from))" /> <stop offset="0.3" stop-color="hsl(var(--gradient-via))" /> <stop offset="0.7" stop-color="hsl(var(--gradient-to))" /> </linearGradient> </defs> <g @if (!$compact) fill="url(#paint0_linear_8997_923)" @endif> <path d="M11.75 7C11.75 6.58579 11.4142 6.25 11 6.25C10.5858 6.25 10.25 6.58579 10.25 7V15C10.25 15.4142 10.5858 15.75 11 15.75C11.4142 15.75 11.75 15.4142 11.75 15V7Z" /> <path d="M8.75 8C8.75 7.58579 8.41421 7.25 8 7.25C7.58579 7.25 7.25 7.58579 7.25 8L7.25 14C7.25 14.4142 7.58579 14.75 8 14.75C8.41421 14.75 8.75 14.4142 8.75 14V8Z" /> <path d="M14.75 8C14.75 7.58579 14.4142 7.25 14 7.25C13.5858 7.25 13.25 7.58579 13.25 8V14C13.25 14.4142 13.5858 14.75 14 14.75C14.4142 14.75 14.75 14.4142 14.75 14V8Z" /> <path d="M5.75 10C5.75 9.58579 5.41421 9.25 5 9.25C4.58579 9.25 4.25 9.58579 4.25 10V12C4.25 12.4142 4.58579 12.75 5 12.75C5.41421 12.75 5.75 12.4142 5.75 12V10Z" /> <path d="M17.75 10C17.75 9.58579 17.4142 9.25 17 9.25C16.5858 9.25 16.25 9.58579 16.25 10V12C16.25 12.4142 16.5858 12.75 17 12.75C17.4142 12.75 17.75 12.4142 17.75 12V10Z" /> <path fill-rule="evenodd" clip-rule="evenodd" d="M11 0.25C5.06294 0.25 0.25 5.06294 0.25 11C0.25 16.9371 5.06294 21.75 11 21.75C16.9371 21.75 21.75 16.9371 21.75 11C21.75 5.06294 16.9371 0.25 11 0.25ZM1.75 11C1.75 5.89137 5.89137 1.75 11 1.75C16.1086 1.75 20.25 5.89137 20.25 11C20.25 16.1086 16.1086 20.25 11 20.25C5.89137 20.25 1.75 16.1086 1.75 11Z" /> </g> </svg> <svg class="invisible col-start-1 col-end-1 row-start-1 row-end-1 -rotate-12 scale-50 opacity-0 transition-all duration-200 group-[&.active]/realtime:visible group-[&.active]/realtime:rotate-0 group-[&.active]/realtime:scale-100 group-[&.active]/realtime:opacity-100" xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 24 24" stroke-width="1" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" > <path d="M7 5l10 14" /> </svg> </span> @if ($compact) <span class="md:hidden"> @lang('Real-Time Chat') </span> @else <span class="text-xs font-medium"> @lang('Start Voice Chat') </span> @endif </x-button> @endif </div> @endif ��������������__MACOSX/._System�����������������������������������������������������������������������������������0000644�����������������00000000243�15266620645�0007473 0����������������������������������������������������������������������������������������������������ustar�00�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Mac OS X ���� ���2���q������£��������������������������������������ATTR�������£���˜��� ������������������˜��� ��com.apple.provenance��¤`˜†TÜç�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������__MACOSX/._resources��������������������������������������������������������������������������������0000644�����������������00000000243�15266620645�0010221 0����������������������������������������������������������������������������������������������������ustar�00�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Mac OS X ���� ���2���q������£��������������������������������������ATTR�������£���˜��� ������������������˜��� ��com.apple.provenance��¤`˜†TÜç�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������__MACOSX/database/migrations/._2025_05_23_143630_create_voice_chat_bots_table.php�������������������0000644�����������������00000000243�15266620645�0022642 0����������������������������������������������������������������������������������������������������ustar�00�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Mac OS X ���� ���2���q������£��������������������������������������ATTR�������£���˜��� ������������������˜��� ��com.apple.provenance��¤`˜†TÜç�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������__MACOSX/database/migrations/._2025_05_23_154408_create_voice_chat_bot_trains_table.php�������������0000644�����������������00000000243�15266620645�0024044 0����������������������������������������������������������������������������������������������������ustar�00�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Mac OS X ���� ���2���q������£��������������������������������������ATTR�������£���˜��� ������������������˜��� ��com.apple.provenance��¤`˜†TÜç�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������__MACOSX/database/._migrations����������������������������������������������������������������������0000644�����������������00000000243�15266620645�0012127 0����������������������������������������������������������������������������������������������������ustar�00�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Mac OS X ���� ���2���q������£��������������������������������������ATTR�������£���˜��� ������������������˜��� ��com.apple.provenance��¤`˜†TÜç�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������__MACOSX/._database���������������������������������������������������������������������������������0000644�����������������00000000243�15266620645�0007753 0����������������������������������������������������������������������������������������������������ustar�00�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Mac OS X ���� ���2���q������£��������������������������������������ATTR�������£���˜��� ������������������˜��� ��com.apple.provenance��¤`˜†TÜç�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������__MACOSX/System/Services/._ElevenLabsVoiceChatService.php�������������������������������������������0000644�����������������00000000243�15266620645�0017173 0����������������������������������������������������������������������������������������������������ustar�00�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Mac OS X ���� ���2���q������£��������������������������������������ATTR�������£���˜��� ������������������˜��� ��com.apple.provenance��¤`˜†TÜç�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������__MACOSX/System/Models/._VoiceChatBotTrain.php������������������������������������������������������0000644�����������������00000000243�15266620645�0015014 0����������������������������������������������������������������������������������������������������ustar�00�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Mac OS X ���� ���2���q������£��������������������������������������ATTR�������£���˜��� ������������������˜��� ��com.apple.provenance��¤`˜†TÜç�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������__MACOSX/System/Models/._VoiceChatBot.php�����������������������������������������������������������0000644�����������������00000000243�15266620645�0014016 0����������������������������������������������������������������������������������������������������ustar�00�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Mac OS X ���� ���2���q������£��������������������������������������ATTR�������£���˜��� ������������������˜��� ��com.apple.provenance��¤`˜†TÜç�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������__MACOSX/System/._Enum������������������������������������������������������������������������������0000644�����������������00000000243�15266620645�0010377 0����������������������������������������������������������������������������������������������������ustar�00�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Mac OS X ���� ���2���q������£��������������������������������������ATTR�������£���˜��� ������������������˜��� ��com.apple.provenance��¤`˜†TÜç�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������__MACOSX/System/Parsers/._LinkParser.php������������������������������������������������������������0000644�����������������00000000243�15266620645�0013752 0����������������������������������������������������������������������������������������������������ustar�00�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Mac OS X ���� ���2���q������£��������������������������������������ATTR�������£���˜��� ������������������˜��� ��com.apple.provenance��¤`˜†TÜç�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������__MACOSX/System/Enum/._TrainTypeEnum.php������������������������������������������������������������0000644�����������������00000000243�15266620645�0013731 0����������������������������������������������������������������������������������������������������ustar�00�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Mac OS X ���� ���2���q������£��������������������������������������ATTR�������£���˜��� ������������������˜��� ��com.apple.provenance��¤`˜†TÜç�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������__MACOSX/System/._Http������������������������������������������������������������������������������0000644�����������������00000000243�15266620645�0010412 0����������������������������������������������������������������������������������������������������ustar�00�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Mac OS X ���� ���2���q������£��������������������������������������ATTR�������£���˜��� ������������������˜��� ��com.apple.provenance��¤`˜†TÜç�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������__MACOSX/System/._Services��������������������������������������������������������������������������0000644�����������������00000000243�15266620645�0011256 0����������������������������������������������������������������������������������������������������ustar�00�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Mac OS X ���� ���2���q������£��������������������������������������ATTR�������£���˜��� ������������������˜��� ��com.apple.provenance��¤`˜†TÜç�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������__MACOSX/System/Http/Controllers/._ElevenLabsVoiceChatController.php��������������������������������0000644�����������������00000000243�15266620645�0021360 0����������������������������������������������������������������������������������������������������ustar�00�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Mac OS X ���� ���2���q������£��������������������������������������ATTR�������£���˜��� ������������������˜��� ��com.apple.provenance��¤`˜†TÜç�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������__MACOSX/System/Http/Controllers/._ElevenLabsVoiceChatTrainController.php���������������������������0000644�����������������00000000243�15266620645�0022356 0����������������������������������������������������������������������������������������������������ustar�00�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Mac OS X ���� ���2���q������£��������������������������������������ATTR�������£���˜��� ������������������˜��� ��com.apple.provenance��¤`˜†TÜç�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������__MACOSX/System/Http/Requests/Train/._DataRequest.php�����������������������������������������������0000644�����������������00000000243�15266620645�0016312 0����������������������������������������������������������������������������������������������������ustar�00�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Mac OS X ���� ���2���q������£��������������������������������������ATTR�������£���˜��� ������������������˜��� ��com.apple.provenance��¤`˜†TÜç�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������__MACOSX/System/Http/Requests/Train/._TrainUrlRequest.php�������������������������������������������0000644�����������������00000000243�15266620645�0017201 0����������������������������������������������������������������������������������������������������ustar�00�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Mac OS X ���� ���2���q������£��������������������������������������ATTR�������£���˜��� ������������������˜��� ��com.apple.provenance��¤`˜†TÜç�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������__MACOSX/System/Http/Requests/Train/._TrainRequest.php����������������������������������������������0000644�����������������00000000243�15266620645�0016516 0����������������������������������������������������������������������������������������������������ustar�00�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Mac OS X ���� ���2���q������£��������������������������������������ATTR�������£���˜��� ������������������˜��� ��com.apple.provenance��¤`˜†TÜç�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������__MACOSX/System/Http/Requests/Train/._TextRequest.php�����������������������������������������������0000644�����������������00000000243�15266620645�0016365 0����������������������������������������������������������������������������������������������������ustar�00�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Mac OS X ���� ���2���q������£��������������������������������������ATTR�������£���˜��� ������������������˜��� ��com.apple.provenance��¤`˜†TÜç�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������__MACOSX/System/Http/Requests/Train/._FileRequest.php�����������������������������������������������0000644�����������������00000000243�15266620645�0016320 0����������������������������������������������������������������������������������������������������ustar�00�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Mac OS X ���� ���2���q������£��������������������������������������ATTR�������£���˜��� ������������������˜��� ��com.apple.provenance��¤`˜†TÜç�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������__MACOSX/System/Http/Requests/._VoiceChatbotUpdateRequest.php���������������������������������������0000644�����������������00000000243�15266620645�0020101 0����������������������������������������������������������������������������������������������������ustar�00�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Mac OS X ���� ���2���q������£��������������������������������������ATTR�������£���˜��� ������������������˜��� ��com.apple.provenance��¤`˜†TÜç�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������__MACOSX/System/Http/Requests/._Train���������������������������������������������������������������0000644�����������������00000000243�15266620645�0013302 0����������������������������������������������������������������������������������������������������ustar�00�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Mac OS X ���� ���2���q������£��������������������������������������ATTR�������£���˜��� ������������������˜��� ��com.apple.provenance��¤`˜†TÜç�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������__MACOSX/System/Http/._Requests���������������������������������������������������������������������0000644�����������������00000000243�15266620645�0012225 0����������������������������������������������������������������������������������������������������ustar�00�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Mac OS X ���� ���2���q������£��������������������������������������ATTR�������£���˜��� ������������������˜��� ��com.apple.provenance��¤`˜†TÜç�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������__MACOSX/System/Http/._Resources��������������������������������������������������������������������0000644�����������������00000000243�15266620645�0012364 0����������������������������������������������������������������������������������������������������ustar�00�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Mac OS X ���� ���2���q������£��������������������������������������ATTR�������£���˜��� ������������������˜��� ��com.apple.provenance��¤`˜†TÜç�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������__MACOSX/System/Http/._Controllers������������������������������������������������������������������0000644�����������������00000000243�15266620645�0012720 0����������������������������������������������������������������������������������������������������ustar�00�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Mac OS X ���� ���2���q������£��������������������������������������ATTR�������£���˜��� ������������������˜��� ��com.apple.provenance��¤`˜†TÜç�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������__MACOSX/System/Http/Resources/._ChatbotTrainResource.php�������������������������������������������0000644�����������������00000000243�15266620645�0017244 0����������������������������������������������������������������������������������������������������ustar�00�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Mac OS X ���� ���2���q������£��������������������������������������ATTR�������£���˜��� ������������������˜��� ��com.apple.provenance��¤`˜†TÜç�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������__MACOSX/System/._Models����������������������������������������������������������������������������0000644�����������������00000000243�15266620645�0010716 0����������������������������������������������������������������������������������������������������ustar�00�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Mac OS X ���� ���2���q������£��������������������������������������ATTR�������£���˜��� ������������������˜��� ��com.apple.provenance��¤`˜†TÜç�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������__MACOSX/System/._Parsers���������������������������������������������������������������������������0000644�����������������00000000243�15266620645�0011112 0����������������������������������������������������������������������������������������������������ustar�00�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Mac OS X ���� ���2���q������£��������������������������������������ATTR�������£���˜��� ������������������˜��� ��com.apple.provenance��¤`˜†TÜç�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������__MACOSX/System/._ElevenLabsVoiceChatServiceProvider.php��������������������������������������������0000644�����������������00000000243�15266620645�0017123 0����������������������������������������������������������������������������������������������������ustar�00�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Mac OS X ���� ���2���q������£��������������������������������������ATTR�������£���˜��� ������������������˜��� ��com.apple.provenance��¤`˜†TÜç�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������__MACOSX/resources/views/particles/._web-site-tab.blade.php�����������������������������������������0000644�����������������00000000243�15266620645�0017463 0����������������������������������������������������������������������������������������������������ustar�00�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Mac OS X ���� ���2���q������£��������������������������������������ATTR�������£���˜��� ������������������˜��� ��com.apple.provenance��¤`˜†TÜç�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������__MACOSX/resources/views/particles/._text-tab.blade.php���������������������������������������������0000644�����������������00000000243�15266620645�0016730 0����������������������������������������������������������������������������������������������������ustar�00�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Mac OS X ���� ���2���q������£��������������������������������������ATTR�������£���˜��� ������������������˜��� ��com.apple.provenance��¤`˜†TÜç�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������__MACOSX/resources/views/particles/._pdf-tab.blade.php����������������������������������������������0000644�����������������00000000243�15266620645�0016515 0����������������������������������������������������������������������������������������������������ustar�00�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Mac OS X ���� ���2���q������£��������������������������������������ATTR�������£���˜��� ������������������˜��� ��com.apple.provenance��¤`˜†TÜç�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������__MACOSX/resources/views/._particles����������������������������������������������������������������0000644�����������������00000000243�15266620645�0013344 0����������������������������������������������������������������������������������������������������ustar�00�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Mac OS X ���� ���2���q������£��������������������������������������ATTR�������£���˜��� ������������������˜��� ��com.apple.provenance��¤`˜†TÜç�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������__MACOSX/resources/views/._index.blade.php����������������������������������������������������������0000644�����������������00000000243�15266620645�0014321 0����������������������������������������������������������������������������������������������������ustar�00�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Mac OS X ���� ���2���q������£��������������������������������������ATTR�������£���˜��� ������������������˜��� ��com.apple.provenance��¤`˜†TÜç�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������__MACOSX/resources/views/components/._chat-button.blade.php�����������������������������������������0000644�����������������00000000243�15266620645�0017627 0����������������������������������������������������������������������������������������������������ustar�00�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Mac OS X ���� ���2���q������£��������������������������������������ATTR�������£���˜��� ������������������˜��� ��com.apple.provenance��¤`˜†TÜç�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������__MACOSX/resources/views/._components���������������������������������������������������������������0000644�����������������00000000243�15266620645�0013543 0����������������������������������������������������������������������������������������������������ustar�00�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Mac OS X ���� ���2���q������£��������������������������������������ATTR�������£���˜��� ������������������˜��� ��com.apple.provenance��¤`˜†TÜç�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������__MACOSX/resources/._views��������������������������������������������������������������������������0000644�����������������00000000243�15266620645�0011356 0����������������������������������������������������������������������������������������������������ustar�00�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Mac OS X ���� ���2���q������£��������������������������������������ATTR�������£���˜��� ������������������˜��� ��com.apple.provenance��¤`˜†TÜç�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������__MACOSX/._extension.json���������������������������������������������������������������������������0000644�����������������00000000243�15266620645�0011173 0����������������������������������������������������������������������������������������������������ustar�00�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Mac OS X ���� ���2���q������£��������������������������������������ATTR�������£���˜��� ������������������˜��� ��com.apple.provenance��¤`˜†TÜç�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������