udpate gpt

This commit is contained in:
ivan deng
2023-03-05 17:29:44 +08:00
parent d4a0e54fb5
commit a31689057f
31 changed files with 213 additions and 192 deletions

View File

@@ -17,7 +17,7 @@ class Channel(models.Model):
@api.model
def get_openai(self, api_key, ai_model, data, user="Odoo"):
headers = {"Content-Type": "application/json", "Authorization": f"Bearer {api_key}"}
R_TIMEOUT = 3
R_TIMEOUT = 5
if ai_model == 'dall-e2':
# todo: 处理 图像引擎,主要是返回参数到聊天中