@extends('layouts.user_type.auth') @extends('layouts.app') @section('css') @endsection @section('content')

Update Assistant

Assistant List
{{-- Tab1 --}}
@csrf
@php $selectedProvider = $assistantData['model']['provider'] ?? ''; $selectedModel = $assistantData['model']['model'] ?? ''; @endphp
{{-- Tab2 --}}
@csrf
{{-- Provider --}} @php $selectedProvider = old( 'transcriber.provider', $assistantData['transcriber']['provider'] ?? '', ); $selectedModel = old( 'transcriber.model', $assistantData['transcriber']['model'] ?? '', ); @endphp
{{-- Model --}}
{{-- Language --}} @php $selectedLanguage = old( 'transcriber.language', $assistantData['transcriber']['language'] ?? '', ); @endphp
{{-- Background Denoising Checkbox --}}
{{-- Submit Button --}}
{{-- Tab3 --}}
@csrf
@php $selectedVoiceProvider = old( 'voice.provider', $assistantData['voice']['provider'] ?? '', ); //dd($assistantData); @endphp {{-- Voice Provider Selection --}}
@php $backchannelingEnabled = old( 'backchanneling_enabled', $assistantData['backchannelingEnabled'] ?? false, ); @endphp
@php $backgroundSound = old( 'background_sound', $assistantData['backgroundSound'] ?? 'default', ); @endphp
@php $backgroundSoundVol = old( 'background_sound_custom', $assistantData['voice']['inputMinCharacters'] ?? '', ); @endphp
@php $punctuationOptions = [ '。', ',', '.', '!', '?', ';', ')', '،', '۔', '।', '॥', '|', '||', ':', ',', ]; $selectedPunctuations = old( 'punctuation_boundaries', $assistantData['voice']['inputPunctuationBoundaries'] ?? [], ); @endphp
{{-- Settings for 11labs --}} {{-- Settings for playht --}} {{-- Settings for azure, openai, etc. --}} @php $provider = $assistantData['voice']['provider'] ?? ''; $otherProviders = [ 'azure', 'openai', 'neuphonic', 'tavus', 'lmnt', 'rime-ai', ]; @endphp {{-- Settings for cartesia --}} @php $speedLevels = ['slowest', 'slow', 'normal', 'fast', 'faster']; $emotionLevels = ['lowest', 'low', 'medium', 'high', 'highest']; $cartesiaSpeedValue = 2; // default $cartesiaEmotionValues = [ 'anger' => 2, 'positivity' => 2, 'surprise' => 2, 'sadness' => 2, 'curiosity' => 2, ]; // Map speed if (($assistantData['voice']['provider'] ?? null) === 'cartesia') { $speedString = $assistantData['voice']['experimentalControls']['speed'] ?? 'normal'; $cartesiaSpeedValue = array_search($speedString, $speedLevels) !== false ? array_search($speedString, $speedLevels) : 2; } // Map emotions if (($assistantData['voice']['provider'] ?? null) === 'cartesia') { $emotionsArray = $assistantData['voice']['experimentalControls']['emotion'] ?? []; foreach ($emotionsArray as $emotionEntry) { [$emotionName, $emotionLevel] = explode(':', $emotionEntry); $index = array_search($emotionLevel, $emotionLevels); if ($index !== false) { $cartesiaEmotionValues[$emotionName] = $index; } } } @endphp
{{-- Tab4 --}} @php // Get selected tool UUIDs from API $selectedTools = $assistantData['model']['toolIds'] ?? []; // dd($selectedTools); $tools = $allTools ?? []; // Tools is the full list of Tool models $selectedToolNames = collect($tools) ->filter(function ($tool) use ($selectedTools) { return in_array($tool->tool_id, $selectedTools); }) ->pluck('tool_name'); //dd($selectedToolNames); @endphp
@csrf @method('POST') {{-- Tools Selector --}} {{-- End Call Function --}}
{{-- Dial Keypad --}}
{{-- Forwarding Phone Number --}}
{{-- End Call Phrases --}}
{{-- Submit Button --}}
{{-- Tab5 --}}
@csrf {{-- Privacy --}}
{{-- Start Speaking Plan --}}
{{ $assistantData['startSpeakingPlan']['waitSeconds'] ?? 2 }}
{{-- Voicemail Detection --}}
{{ $assistantData['voicemailDetection']['voicemailExpectedDurationSeconds'] ?? 30 }}
{{-- Call Timeout Settings --}}
{{ $assistantData['silenceTimeoutSeconds'] ?? 1800 }}
{{ $assistantData['maxDurationSeconds'] ?? 21600 }}
{{-- Messaging --}}
{{-- --}}
@php $selectedClientMessages = $assistantData['clientMessages'] ?? []; @endphp
@php $selectedServerMessages = $assistantData['serverMessages'] ?? []; @endphp
@php $selectedidleMessages = $assistantData['messagePlan']['idleMessages'] ?? []; //dd($selectedidleMessages); @endphp
{{-- Idle Settings --}}
{{ $assistantData['messagePlan']['idleMessageMaxSpokenCount'] ?? 5 }}
{{ $assistantData['messagePlan']['idleTimeoutSeconds'] ?? 30 }}
{{-- Tab6 --}}
{{-- Summary Prompt --}}
{{-- Success Evaluation --}}
{{-- Structured Data Timeout --}}
@endsection @section('script') {{-- JavaScript for Toggling Provider Settings --}} {{-- Transcriber model dynamic update --}} {{-- Fetch Voices from Vapi API --}} {{-- Model Options per Provider --}} @endsection