Skip to content

Commit

Permalink
this will allow the user to choose between pusher or reverb
Browse files Browse the repository at this point in the history
  • Loading branch information
alnutile committed Jul 3, 2024
1 parent 484a281 commit a26a8f9
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 32 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ AWS_BUCKET=
AWS_USE_PATH_STYLE_ENDPOINT=false

VITE_APP_NAME="${APP_NAME}"
VITE_BROADCAST_CONNECTION="${BROADCAST_CONNECTION}"

OPENAI_API_KEY=
OPENAI_ORGANIZATION=
Expand Down
1 change: 0 additions & 1 deletion .env.production.encrypted

This file was deleted.

1 change: 0 additions & 1 deletion Modules/LlmDriver/app/Orchestrate.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ public function handle(
string $tool = ''): ?string
{


if ($tool) {
Log::info('[LaraChain] Orchestration Has Tool', [
'tool' => $tool,
Expand Down
22 changes: 4 additions & 18 deletions resources/js/Pages/Chat/Chatv2.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,31 +56,17 @@ const getting_results = ref(false)
onMounted(() => {
Echo.private(`collection.chat.${props.chat.chatable_id}.${props.chat.id}`)
.listen('.status', (e) => {
router.reload({
preserveScroll: true,
})
// @NOTE hmm why did I do this?
// router.reload({
// preserveScroll: true,
// })
})
.listen('.update', (e) => {
if(e.updateMessage === 'Complete') {
getting_results.value = false
router.reload({
preserveScroll: true,
})
} else {
toast.success(e.updateMessage, {
position: "bottom-right",
timeout: 2000,
closeOnClick: true,
pauseOnFocusLoss: false,
pauseOnHover: false,
draggable: false,
draggablePercent: 0.6,
showCloseButtonOnHover: true,
hideProgressBar: true,
closeButton: "button",
icon: true,
rtl: false
});
}
});
});
Expand Down
6 changes: 5 additions & 1 deletion resources/js/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,9 @@ window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
* for events that are broadcast by Laravel. Echo and event broadcasting
* allow your team to quickly build robust real-time web applications.
*/
if(import.meta.env.VITE_BROADCAST_CONNECTION === 'pusher') {
import('./echoPusher');
} else {
import('./echo');
}

import './echo';
11 changes: 4 additions & 7 deletions resources/js/echoPusher.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@ import Pusher from 'pusher-js';
window.Pusher = Pusher;

window.Echo = new Echo({
broadcaster: 'reverb',
key: import.meta.env.VITE_REVERB_APP_KEY,
wsHost: import.meta.env.VITE_REVERB_HOST,
wsPort: import.meta.env.VITE_REVERB_PORT ?? 80,
wssPort: import.meta.env.VITE_REVERB_PORT ?? 443,
forceTLS: (import.meta.env.VITE_REVERB_SCHEME ?? 'https') === 'https',
enabledTransports: ['ws', 'wss'],
broadcaster: 'pusher',
key: import.meta.env.VITE_PUSHER_APP_KEY,
cluster: import.meta.env.VITE_PUSHER_APP_CLUSTER,
forceTLS: true
});
8 changes: 4 additions & 4 deletions tests/fixtures/after_mapping.json

Large diffs are not rendered by default.

0 comments on commit a26a8f9

Please sign in to comment.