[17] app_chatgpt

This commit is contained in:
Chill
2025-02-10 15:05:33 +08:00
parent 02c156b6c0
commit a34b5fc067
3 changed files with 16 additions and 13 deletions

View File

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

View File

@@ -229,16 +229,19 @@ GPT-3 A set of models that can understand and generate natural language
def get_ai_list_model(self): def get_ai_list_model(self):
self.ensure_one() self.ensure_one()
headers = {"Content-Type": "application/json", "Authorization": f"Bearer {self.openapi_api_key}"} if self.provider == 'openai':
R_TIMEOUT = self.ai_timeout or 120 headers = {"Content-Type": "application/json", "Authorization": f"Bearer {self.openapi_api_key}"}
o_url = "https://api.openai.com/v1/models" R_TIMEOUT = self.ai_timeout or 120
if self.endpoint: o_url = "https://api.openai.com/v1/models"
o_url = self.endpoint.replace("/chat/completions", "") + "/models" if self.endpoint:
response = requests.get(o_url, headers=headers, timeout=R_TIMEOUT) o_url = self.endpoint.replace("/chat/completions", "") + "/models"
response.close() response = requests.get(o_url, headers=headers, timeout=R_TIMEOUT)
if response: response.close()
res = response.json() if response:
r_text = json.dumps(res, indent=2) res = response.json()
r_text = json.dumps(res, indent=2)
else:
r_text = 'No response.'
else: else:
r_text = 'No response.' r_text = 'No response.'
raise UserError(r_text) raise UserError(r_text)

View File

@@ -4,14 +4,14 @@
<h2 class="oe_slogan"> Latest ChatGPT AI Center. GPT 3.5, Ali Ai, Baidu Ai, Multi Robot Support. Chat and Training </h2> <h2 class="oe_slogan"> Latest ChatGPT AI Center. GPT 3.5, Ali Ai, Baidu Ai, Multi Robot Support. Chat and Training </h2>
<h3 class="oe_slogan"> Support chatgpt 4 32k. 3.5 turbo, text-davinci, Integration All ChatGpt Api. </h3> <h3 class="oe_slogan"> Support chatgpt 4 32k. 3.5 turbo, text-davinci, Integration All ChatGpt Api. </h3>
<div class="oe_row"> <div class="oe_row">
<h3>Latest update: v17.24.04.01</h3> <h3>Latest update: v17.25.02.10</h3>
<div class="row"> <div class="row">
<div class="row"> <div class="row">
Add Alibaba Qwen support(search 'app_ai_ali'), update chatgpt api Add Alibaba Qwen support(search 'app_ai_ali'), update chatgpt api
</div> </div>
<img class="oe_demo oe_screenshot img img-fluid" src="demo02.jpg"> <img class="oe_demo oe_screenshot img img-fluid" src="demo02.jpg">
</div> </div>
<h3>Latest update: v17.24.04.01</h3> <h3>Latest update: v17.25.02.10</h3>
<div class="row"> <div class="row">
<img class="oe_demo oe_screenshot img img-fluid" style="max-height: 100%;" src="banner.png"> <img class="oe_demo oe_screenshot img img-fluid" style="max-height: 100%;" src="banner.png">
</div> </div>