log user prompts in server file

This commit is contained in:
DarrenZal 2024-01-11 23:41:25 -08:00
parent 4d02230c54
commit 15b9dc8f54
2 changed files with 6 additions and 3 deletions

View File

@ -1,7 +1,9 @@
<script lang="ts">
import { writable } from 'svelte/store'
import axios from 'axios'
import { sessionStore } from '$src/stores'
let username = $sessionStore.username;
const messages = writable([])
let newMessage = ''
let isLoading = writable(false) // To track loading state
@ -31,8 +33,9 @@
// Send both the new message and the correct chat history
const response = await axios.post('https://myseelia.life/query', {
question: newMessage,
history: chatHistory
})
history: chatHistory,
username: username // Send username
});
console.log('Response:', response.data)
let resultText = ''

View File

@ -5,4 +5,4 @@
padding: 10px;
}
</style>
<div class="wordmark" dark:text-white>Myseelia</div>
<div class="wordmark" dark:text-white>ReFiChat</div>