log user prompts in server file
This commit is contained in:
parent
4d02230c54
commit
15b9dc8f54
|
|
@ -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 = ''
|
||||
|
|
|
|||
|
|
@ -5,4 +5,4 @@
|
|||
padding: 10px;
|
||||
}
|
||||
</style>
|
||||
<div class="wordmark" dark:text-white>Myseelia</div>
|
||||
<div class="wordmark" dark:text-white>ReFiChat</div>
|
||||
Loading…
Reference in New Issue