Commit cbc14bfe authored by 黄泳凯's avatar 黄泳凯
Browse files

Fix:Error code:500,param:Request timed out, please try again later.

parent c5480b9d
......@@ -85,8 +85,12 @@ Corrected title list:
messages=[
{'role': 'user', 'content': title_optimize_prompt}],
temperature=0.7,
stream=True,
)
content = completion.choices[0].message.content.strip()
content = ""
for chunk in completion:
if chunk.choices:
content += chunk.choices[0].delta.content
# logger.info(f"Title completion: {content}")
if "</think>" in content:
idx = content.index("</think>") + len("</think>")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment