[18] app_chatgpt, model_list

This commit is contained in:
Chill
2025-02-10 15:51:48 +08:00
parent 44c34115af
commit 929b3084d9
2 changed files with 14 additions and 11 deletions

View File

@@ -10,7 +10,7 @@
{
'name': 'ChatGPT4, China Ali,AiGC Center.Ai服务中心聚合全网Ai',
'version': '18.0.25.01.08',
'version': '18.0.25.02.10',
'author': 'odooai.cn',
'company': 'odooai.cn',
'maintainer': 'odooai.cn',

View File

@@ -234,6 +234,7 @@ GPT-3 A set of models that can understand and generate natural language
def get_ai_list_model(self):
self.ensure_one()
if self.provider == 'openai':
headers = {"Content-Type": "application/json", "Authorization": f"Bearer {self.openapi_api_key}"}
R_TIMEOUT = self.ai_timeout or 120
o_url = "https://api.openai.com/v1/models"
@@ -246,6 +247,8 @@ GPT-3 A set of models that can understand and generate natural language
r_text = json.dumps(res, indent=2)
else:
r_text = 'No response.'
else:
r_text = 'No response.'
raise UserError(r_text)
def get_openai(self, data, author_id, answer_id, param={}):