Skip to content

Commit

Permalink
fix: resolve display issue for replies containing only URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
6vision committed Dec 26, 2024
1 parent 16324e7 commit 54ff5db
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 54ff5db

Please sign in to comment.