|
@@ -76,9 +76,10 @@ class GPT4o():
|
|
|
else:
|
|
|
content = response['data']['choices'][0]['message']['content']
|
|
|
if content:
|
|
|
- match = re.search(r'"新标题":\s*"([^"]+)"', content)
|
|
|
- if match:
|
|
|
- return match.group(1)
|
|
|
+ data = json.loads(content)
|
|
|
+ title = data["title"]
|
|
|
+ if title:
|
|
|
+ return title
|
|
|
else:
|
|
|
return content
|
|
|
elif attempt == max_retries - 1:
|