update app_chatgpt disconnect

This commit is contained in:
Chill
2023-02-22 18:59:12 +08:00
parent 4c731b5b18
commit 634e772d3a
5 changed files with 31 additions and 1 deletions

View File

@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
import requests
from odoo import api, fields, models, _
@@ -12,3 +13,7 @@ class GptRobot(models.Model):
openapi_api_key = fields.Char(string="API Key", help="Provide the API key here")
temperature = fields.Float(string='Temperature', default=0.9)
sequence = fields.Integer('Sequence', help="Determine the display order", default=10)
def action_disconnect(self):
requests.delete('https://chatgpt.com/v1/disconnect')