mild changes to the ais and added models to models.tsx

This commit is contained in:
Patrick_Pluto 2024-09-30 11:30:30 +02:00
parent a23257be7f
commit d83aeb2c74
3 changed files with 21 additions and 7 deletions

View file

@ -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'})