Moved function calls to new format

This commit is contained in:
Saifeddine ALOUI 2025-03-07 20:51:30 +01:00
parent 6d827c4d98
commit 31b2bc272b
9 changed files with 58 additions and 12 deletions

View File

@ -1,5 +1,5 @@
# =================== Lord Of Large Language Multimodal Systems Configuration file ===========================
version: 159
version: 160
# video viewing and news recovering
last_viewed_video: null
@ -31,7 +31,7 @@ host: localhost
port: 9600
app_custom_logo: ""
app_custom_name: "LoLLMS"
app_custom_name: ""
app_show_changelogs: true
app_custom_welcome_message: ""
app_custom_slogan: ""

@ -1 +1 @@
Subproject commit fa8d2c72025c591fa74bffd49bc1f6c05eda233a
Subproject commit d0e86906e9eacd3cc83e90d72f51cd31cdc7bc4b

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

4
web/dist/index.html vendored
View File

@ -6,8 +6,8 @@
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>LoLLMS WebUI</title>
<script type="module" crossorigin src="/assets/index-lytV2vhq.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-Cf6nRMzW.css">
<script type="module" crossorigin src="/assets/index-Brb8p9Rt.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-9tk66N98.css">
</head>
<body>
<div id="app"></div>

View File

@ -86,6 +86,7 @@ export default {
onRemount: Function,
onCopyToCustom: Function,
onEdit: Function,
onShowSettings: Function,
onCopyfunction_callName: Function,
onToggleFavorite: Function
},
@ -129,6 +130,9 @@ export default {
})
},
methods: {
show_settings(){
this.onShowSettings(this)
},
formatDate(dateString) {
const options = { year: 'numeric', month: 'short', day: 'numeric' };
return new Date(dateString).toLocaleDateString(undefined, options);

View File

@ -1885,7 +1885,7 @@ export default {
showModelConfig(){
try {
this.isLoading = true
axios.get('/get_active_binding_settings').then(res => {
axios.post('/get_active_binding_settings',{client_id:this.$store.state.client_id}).then(res => {
this.isLoading = false
if (res) {
if (res.data && Object.keys(res.data).length > 0) {
@ -2244,7 +2244,7 @@ export default {
onSettingsBinding() {
try {
this.isLoading = true
axios.get('/get_active_binding_settings').then(res => {
axios.post('/get_active_binding_settings',{client_id:this.$store.state.client_id}).then(res => {
this.isLoading = false
if (res) {
if (res.data && Object.keys(res.data).length > 0) {

View File

@ -4776,6 +4776,7 @@
<function-entry ref="functionsZoo" v-for="(func, index) in functionsFiltered"
:key="'index-' + index + '-' + func.name"
:function_call="func"
:on-show-settings="showFunctionSettings"
:on-mount="mountFunction"
:on-un-mount="unmountFunction"
:on-re-mount="remountFunction"
@ -5488,7 +5489,48 @@ export default {
}
this.saveFavoritesToLocalStorage();
},
async showFunctionSettings(entry){
const func = entry.function_call
try {
this.isLoading = true
axios.post('/get_function_call_settings',{client_id:this.$store.state.client_id,dir:func.category,name:func.name}).then(res => {
console.log(res)
this.isLoading = false
if (res) {
if (res.data && Object.keys(res.data).length > 0) {
// open form
this.$store.state.universalForm.showForm(res.data, "Function call settings - " +this.$store.state.config.active_ttv_service, "Save changes", "Cancel").then(res => {
// send new data
try {
axios.post('/set_function_call_settings',
{client_id:this.$store.state.client_id,dir:func.dir,name:func.name, "settings":res}, {headers: this.posts_headers}).then(response => {
if (response && response.data) {
console.log('function call set with new settings', response.data)
this.$store.state.toast.showToast("function call settings updated successfully!", 4, true)
} else {
this.$store.state.toast.showToast("Did not get function call settings responses.\n" + response, 4, false)
this.isLoading = false
}
})
} catch (error) {
this.$store.state.toast.showToast("Did not get function call settings responses.\n Endpoint error: " + error.message, 4, false)
this.isLoading = false
}
})
} else {
this.$store.state.toast.showToast("Function call has no settings", 4, false)
this.isLoading = false
}
}
})
} catch (error) {
this.isLoading = false
this.$store.state.toast.showToast("Could not open function call settings. Endpoint error: " + error.message, 4, false)
}
},
// Mount a function
async mountFunction(entry) {
const func = entry.function_call

@ -1 +1 @@
Subproject commit 11fdabed29a758dbe087ab5f592d6fb76f6cba06
Subproject commit 8dc4a0f5166ad36410d6f83f6b8ad12cc00a5931