forked from React-Group/interstellar_ai
mild changes to the ais and added models to models.tsx
This commit is contained in:
parent
a23257be7f
commit
d83aeb2c74
3 changed files with 21 additions and 7 deletions
|
@ -70,6 +70,13 @@ class API:
|
|||
thread.start()
|
||||
thread.join()
|
||||
return jsonify({'status': 200})
|
||||
elif model_type == "google":
|
||||
api_key = data.get('api_key')
|
||||
thread = threading.Thread(target=self.ai.process_google,
|
||||
args=(ai_model, messages, self, access_token, api_key))
|
||||
thread.start()
|
||||
thread.join()
|
||||
return jsonify({'status': 200})
|
||||
|
||||
return jsonify({'status': 401, 'error': 'Invalid AI model type'})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue