Unverified Commit 1719c71a authored by Xiaomeng Zhao's avatar Xiaomeng Zhao Committed by GitHub
Browse files

Merge pull request #2634 from Ar-Hyk/master

Fix:Error code:500,param:Request timed out, please try again later.
parents f67c723f e5735d95
......@@ -90,8 +90,13 @@ Corrected title list:
messages=[
{'role': 'user', 'content': title_optimize_prompt}],
temperature=0.7,
stream=True,
)
content = completion.choices[0].message.content.strip()
content_pieces = []
for chunk in completion:
if chunk.choices and chunk.choices[0].delta.content is not None:
content_pieces.append(chunk.choices[0].delta.content)
content = "".join(content_pieces).strip()
# 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