isididiidid commited on
Commit
a6d3404
·
verified ·
1 Parent(s): c36ccd7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -619,9 +619,11 @@ class GrokApiClient:
619
  search = request_data["model"] in ["grok-2-search", "grok-3-search"]
620
 
621
  def remove_think_tags(text):
622
- import re
623
- text = re.sub(r'<think>[\s\S]*?<\/think>', '', text).strip()
624
- text = re.sub(r'!$$
 
 
625
  image
626
  $$$data:.*?base64,.*?$', '[图片]', text)
627
  return text
 
619
  search = request_data["model"] in ["grok-2-search", "grok-3-search"]
620
 
621
  def remove_think_tags(text):
622
+ import re
623
+ text = re.sub(r'<think>[\s\S]*?<\/think>', '', text).strip()
624
+ text = re.sub(r'!\[image\]\(data:.*?base64,.*?\)', '[图片]', text)
625
+ return text
626
+
627
  image
628
  $$$data:.*?base64,.*?$', '[图片]', text)
629
  return text