hard coded.....
This commit is contained in:
parent
42b28708be
commit
3ec587bfd7
2 changed files with 4 additions and 1 deletions
|
@ -254,7 +254,7 @@ const InputOutputBackend: React.FC = () => {
|
||||||
}
|
}
|
||||||
setInputMessage("")
|
setInputMessage("")
|
||||||
const windowname = window.location.hostname
|
const windowname = window.location.hostname
|
||||||
postWorkerRef.current.postMessage({ messages: [...messages, { role: "user", content: inputValue }], ai_model: "llama3.2", model_type: type, access_token: accessToken, api_key: api_key, windowname })
|
postWorkerRef.current.postMessage({ messages: [...messages, { role: "user", content: inputValue }], ai_model: localStorage.getItem("model") || "llama3.2", model_type: type, access_token: accessToken, api_key: api_key, windowname })
|
||||||
startGetWorker()
|
startGetWorker()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,6 +43,8 @@ class API:
|
||||||
model_type = data.get("model_type")
|
model_type = data.get("model_type")
|
||||||
ai_model = data.get("ai_model")
|
ai_model = data.get("ai_model")
|
||||||
access_token = data.get("access_token")
|
access_token = data.get("access_token")
|
||||||
|
|
||||||
|
print(model_type)
|
||||||
if access_token not in self.ai_response:
|
if access_token not in self.ai_response:
|
||||||
return jsonify({"status": 401, "error": "Invalid access token"})
|
return jsonify({"status": 401, "error": "Invalid access token"})
|
||||||
|
|
||||||
|
@ -56,6 +58,7 @@ class API:
|
||||||
sleep(0.5)
|
sleep(0.5)
|
||||||
return jsonify({"status": 200})
|
return jsonify({"status": 200})
|
||||||
elif model_type == "mistral":
|
elif model_type == "mistral":
|
||||||
|
print(model_type)
|
||||||
api_key = data.get("api_key")
|
api_key = data.get("api_key")
|
||||||
thread = threading.Thread(
|
thread = threading.Thread(
|
||||||
target=self.ai.process_mistralai,
|
target=self.ai.process_mistralai,
|
||||||
|
|
Loading…
Reference in a new issue