|
@@ -77,7 +77,10 @@ class GPT4o():
|
|
|
title = match.group(1)
|
|
|
return title
|
|
|
else:
|
|
|
- if attempt == max_retries - 1:
|
|
|
+ content = response['data']['choices'][0]['message']['content']
|
|
|
+ if content:
|
|
|
+ return content
|
|
|
+ elif attempt == max_retries - 1:
|
|
|
return "🔴好漂亮的视频,给你最美的祝福❗"
|
|
|
# content = response['data']['choices'][0]['message']['content']
|
|
|
# data = json.loads(content)
|
|
@@ -146,5 +149,5 @@ class GPT4o():
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
- title = '请叫我kitty女王看到kitty请疯狂砸向我!k门永存hellokitty可爱到犯规购物分享'
|
|
|
+ title = '千钧一发中的“均”是多少斤'
|
|
|
GPT4o.get_ai_title(title)
|