CodeChamp95 commited on
Commit
d89add7
·
verified ·
1 Parent(s): 0d3df19

Update agent.py

Browse files
Files changed (1) hide show
  1. agent.py +2 -1
agent.py CHANGED
@@ -499,7 +499,8 @@ class BERTopicAgent:
499
 
500
  def _update_downloads(self, text: str) -> None:
501
  """Scan agent text for downloadable artefact paths."""
502
- found = re.findall(r'artifacts/[\w_]+\.(json|csv|txt|npy|html)', text)
 
503
  new = list(filter(lambda p: p not in self._downloads, found))
504
  self._downloads.extend(new)
505
 
 
499
 
500
  def _update_downloads(self, text: str) -> None:
501
  """Scan agent text for downloadable artefact paths."""
502
+ # Added ?: to make it a non-capturing group
503
+ found = re.findall(r'artifacts/[\w_]+\.(?:json|csv|txt|npy|html)', text)
504
  new = list(filter(lambda p: p not in self._downloads, found))
505
  self._downloads.extend(new)
506