Skip to content

Commit

Permalink
Merge pull request #2435 from 6vision/master
Browse files Browse the repository at this point in the history
fix: resolve display issue for replies containing only image URLs
  • Loading branch information
zhayujie authored Dec 26, 2024
2 parents 4ab7bd3 + 71662c9 commit a2442ec
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bot/linkai/link_ai_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,9 @@ def _chat(self, query, context, retry_count=0) -> Reply:
if response["choices"][0].get("img_urls"):
thread = threading.Thread(target=self._send_image, args=(context.get("channel"), context, response["choices"][0].get("img_urls")))
thread.start()
if response["choices"][0].get("text_content"):
reply_content = response["choices"][0].get("text_content")
reply_content = self._process_url(reply_content)
reply_content = response["choices"][0].get("text_content")
if reply_content:
reply_content = self._process_url(reply_content)
return Reply(ReplyType.TEXT, reply_content)

else:
Expand Down

0 comments on commit a2442ec

Please sign in to comment.