log user prompts in server file
This commit is contained in:
parent
4d02230c54
commit
15b9dc8f54
|
|
@ -1,7 +1,9 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { writable } from 'svelte/store'
|
import { writable } from 'svelte/store'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
|
import { sessionStore } from '$src/stores'
|
||||||
|
|
||||||
|
let username = $sessionStore.username;
|
||||||
const messages = writable([])
|
const messages = writable([])
|
||||||
let newMessage = ''
|
let newMessage = ''
|
||||||
let isLoading = writable(false) // To track loading state
|
let isLoading = writable(false) // To track loading state
|
||||||
|
|
@ -31,8 +33,9 @@
|
||||||
// Send both the new message and the correct chat history
|
// Send both the new message and the correct chat history
|
||||||
const response = await axios.post('https://myseelia.life/query', {
|
const response = await axios.post('https://myseelia.life/query', {
|
||||||
question: newMessage,
|
question: newMessage,
|
||||||
history: chatHistory
|
history: chatHistory,
|
||||||
})
|
username: username // Send username
|
||||||
|
});
|
||||||
console.log('Response:', response.data)
|
console.log('Response:', response.data)
|
||||||
|
|
||||||
let resultText = ''
|
let resultText = ''
|
||||||
|
|
|
||||||
|
|
@ -5,4 +5,4 @@
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<div class="wordmark" dark:text-white>Myseelia</div>
|
<div class="wordmark" dark:text-white>ReFiChat</div>
|
||||||
Loading…
Reference in New Issue