Merge branch 'main' into main
This commit is contained in:
commit
3d42572120
8 changed files with 58 additions and 41 deletions
|
@ -9,7 +9,6 @@ import { resolve } from "path";
|
|||
import { FFmpeg } from "@ffmpeg/ffmpeg";
|
||||
import { fetchFile, toBlobURL } from "@ffmpeg/util"
|
||||
|
||||
|
||||
const InputOutputBackend: React.FC = () => {
|
||||
// # variables
|
||||
type Message = {
|
||||
|
@ -174,7 +173,15 @@ const InputOutputBackend: React.FC = () => {
|
|||
if (postWorkerRef.current) {
|
||||
addMessage("user", inputValue)
|
||||
console.log("input:", inputValue);
|
||||
postWorkerRef.current.postMessage({ messages: [...messages, { role: "user", content: inputValue }], ai_model: "llama3.2", access_token: accessToken })
|
||||
const type = localStorage.getItem('type')
|
||||
var api_key: string = ""
|
||||
if (type != null && type != 'local') {
|
||||
const try_key = localStorage.getItem(type)
|
||||
if (try_key) {
|
||||
api_key = try_key
|
||||
}
|
||||
}
|
||||
postWorkerRef.current.postMessage({ messages: [...messages, { role: "user", content: inputValue }], ai_model: localStorage.getItem('model'), model_type: type, access_token: accessToken, api_key: api_key })
|
||||
startGetWorker()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue