mirror of
https://github.com/guohuadeng/app-odoo.git
synced 2025-02-23 04:11:36 +02:00
add gpt
This commit is contained in:
@@ -10,8 +10,28 @@ class AiRobot(models.Model):
|
||||
_order = 'sequence, name'
|
||||
|
||||
name = fields.Char(string='Name', translate=True)
|
||||
provider = fields.Selection(string="AI Provider", selection=[('openai', 'OpenAI')], required=True, default='openai')
|
||||
ai_model = fields.Selection(string="AI Model", selection=[
|
||||
('gpt-3.5-turbo', 'Chatgpt 3.5 Turbo'),
|
||||
('gpt-3.5-turbo-0301', 'Chatgpt 3.5 Turbo on 20230301'),
|
||||
('text-davinci-003', 'Chatgpt 3 Davinci'),
|
||||
('code-davinci-002', 'Chatgpt 2 Code Optimized'),
|
||||
('text-davinci-002', 'Chatgpt 2 Davinci'),
|
||||
('dall-e2', 'Dall-E Image'),
|
||||
], required=True, default='gpt-3.5-turbo',
|
||||
help="""
|
||||
GPT-3.5: A set of models that improve on GPT-3 and can understand as well as generate natural language or code
|
||||
DALL·E: A model that can generate and edit images given a natural language prompt
|
||||
Whisper: A model that can convert audio into text
|
||||
Embeddings: A set of models that can convert text into a numerical form
|
||||
CodexLimited: A set of models that can understand and generate code, including translating natural language to code
|
||||
Moderation: A fine-tuned model that can detect whether text may be sensitive or unsafe
|
||||
GPT-3 A set of models that can understand and generate natural language
|
||||
""")
|
||||
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):
|
||||
|
||||
Reference in New Issue
Block a user