mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2025-02-11 13:05:22 +00:00
Upgraded ui
This commit is contained in:
parent
e3e7ec27ad
commit
b0a030f132
@ -230,13 +230,13 @@ class LoLLMsAPI(LollmsApplication):
|
|||||||
def stop_webcam_video_stream():
|
def stop_webcam_video_stream():
|
||||||
self.webcam.stop_capture()
|
self.webcam.stop_capture()
|
||||||
|
|
||||||
@socketio.on('start_webcam_video_stream')
|
@socketio.on('start_audio_stream')
|
||||||
def start_webcam_video_stream():
|
def start_audio_stream():
|
||||||
self.webcam.start_capture()
|
self.audio_cap.start_recording()
|
||||||
|
|
||||||
@socketio.on('stop_webcam_video_stream')
|
@socketio.on('stop_audio_stream')
|
||||||
def stop_webcam_video_stream():
|
def stop_audio_stream():
|
||||||
self.webcam.stop_capture()
|
self.audio_cap.stop_recording()
|
||||||
|
|
||||||
|
|
||||||
@socketio.on('upgrade_vectorization')
|
@socketio.on('upgrade_vectorization')
|
||||||
|
14
app.py
14
app.py
@ -630,12 +630,19 @@ try:
|
|||||||
"""Opens code folder in vs code."""
|
"""Opens code folder in vs code."""
|
||||||
|
|
||||||
data = request.get_json()
|
data = request.get_json()
|
||||||
|
code = data["code"]
|
||||||
discussion_id = data.get("discussion_id","unknown_discussion")
|
discussion_id = data.get("discussion_id","unknown_discussion")
|
||||||
|
message_id = data.get("message_id","unknown_message")
|
||||||
|
language = data.get("language","python")
|
||||||
|
|
||||||
ASCIIColors.info("Opening folder:")
|
ASCIIColors.info("Opening folder:")
|
||||||
# Create a temporary file.
|
# Create a temporary file.
|
||||||
root_folder = self.lollms_paths.personal_outputs_path/"discussions"/f"d_{discussion_id}"
|
root_folder = self.lollms_paths.personal_outputs_path/"discussions"/f"d_{discussion_id}"
|
||||||
root_folder.mkdir(parents=True,exist_ok=True)
|
root_folder.mkdir(parents=True,exist_ok=True)
|
||||||
|
tmp_file = root_folder/f"ai_code_{message_id}.py"
|
||||||
|
with open(tmp_file,"w") as f:
|
||||||
|
f.write(code)
|
||||||
|
|
||||||
os.system('code ' + str(root_folder))
|
os.system('code ' + str(root_folder))
|
||||||
return {"output": "OK", "execution_time": 0}
|
return {"output": "OK", "execution_time": 0}
|
||||||
|
|
||||||
@ -645,11 +652,18 @@ try:
|
|||||||
data = request.get_json()
|
data = request.get_json()
|
||||||
discussion_id = data.get("discussion_id","unknown_discussion")
|
discussion_id = data.get("discussion_id","unknown_discussion")
|
||||||
message_id = data.get("message_id","")
|
message_id = data.get("message_id","")
|
||||||
|
code = data["code"]
|
||||||
|
discussion_id = data.get("discussion_id","unknown_discussion")
|
||||||
|
message_id = data.get("message_id","unknown_message")
|
||||||
|
language = data.get("language","python")
|
||||||
|
|
||||||
ASCIIColors.info("Opening folder:")
|
ASCIIColors.info("Opening folder:")
|
||||||
# Create a temporary file.
|
# Create a temporary file.
|
||||||
root_folder = self.lollms_paths.personal_outputs_path/"discussions"/f"d_{discussion_id}"/f"{message_id}.py"
|
root_folder = self.lollms_paths.personal_outputs_path/"discussions"/f"d_{discussion_id}"/f"{message_id}.py"
|
||||||
root_folder.mkdir(parents=True,exist_ok=True)
|
root_folder.mkdir(parents=True,exist_ok=True)
|
||||||
|
tmp_file = root_folder/f"ai_code_{message_id}.py"
|
||||||
|
with open(tmp_file,"w") as f:
|
||||||
|
f.write(code)
|
||||||
os.system('code ' + str(root_folder))
|
os.system('code ' + str(root_folder))
|
||||||
return {"output": "OK", "execution_time": 0}
|
return {"output": "OK", "execution_time": 0}
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 7f12658b7ab61b9727c90e08f049cbf270bdaabc
|
Subproject commit d250265cb07dfdd8fc3cecb8c73e618ae32038d7
|
File diff suppressed because one or more lines are too long
2
web/dist/index.html
vendored
2
web/dist/index.html
vendored
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>LoLLMS WebUI - Welcome</title>
|
<title>LoLLMS WebUI - Welcome</title>
|
||||||
<script type="module" crossorigin src="/assets/index-f369a711.js"></script>
|
<script type="module" crossorigin src="/assets/index-121a39f1.js"></script>
|
||||||
<link rel="stylesheet" href="/assets/index-3789d6b8.css">
|
<link rel="stylesheet" href="/assets/index-3789d6b8.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
@ -153,7 +153,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
openFolderVsCode(){
|
openFolderVsCode(){
|
||||||
const json = JSON.stringify({ 'discussion_id': this.discussion_id })
|
const json = JSON.stringify({ 'code': this.code, 'discussion_id': this.discussion_id, 'message_id': this.message_id, 'language': this.language})
|
||||||
console.log(json)
|
console.log(json)
|
||||||
fetch(`${this.host}/open_code_in_vs_code`, {
|
fetch(`${this.host}/open_code_in_vs_code`, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
@ -173,7 +173,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
openVsCode() {
|
openVsCode() {
|
||||||
const json = JSON.stringify({ 'discussion_id': this.discussion_id, 'message_id': this.message_id, 'language': this.language })
|
const json = JSON.stringify({ 'code': this.code, 'discussion_id': this.discussion_id, 'message_id': this.message_id, 'language': this.language })
|
||||||
console.log(json)
|
console.log(json)
|
||||||
fetch(`${this.host}/open_code_folder_in_vs_code`, {
|
fetch(`${this.host}/open_code_folder_in_vs_code`, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
Personality does not have an avatar.
|
Personality does not have an avatar.
|
||||||
</div>
|
</div>
|
||||||
<FloatingFrame />
|
<FloatingFrame />
|
||||||
|
<AudioFrame />
|
||||||
<div class="floating-frame2">
|
<div class="floating-frame2">
|
||||||
<div v-html="htmlContent"></div>
|
<div v-html="htmlContent"></div>
|
||||||
</div>
|
</div>
|
||||||
@ -21,6 +22,8 @@
|
|||||||
import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';
|
import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';
|
||||||
import { TextureLoader } from 'three';
|
import { TextureLoader } from 'three';
|
||||||
import FloatingFrame from '@/components/FloatingFrame.vue';
|
import FloatingFrame from '@/components/FloatingFrame.vue';
|
||||||
|
import AudioFrame from '@/components/AudioFrame.vue';
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data(){
|
data(){
|
||||||
@ -35,7 +38,8 @@
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
FloatingFrame
|
FloatingFrame,
|
||||||
|
AudioFrame
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
isReady:{
|
isReady:{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user