Skip to content

Commit e04893c

Browse files
Merge pull request openai#289 from fabiofranco85/fabiofranco85-patch-1
Improve regex in web crawler
2 parents 824953f + 5a80ef2 commit e04893c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/web-crawl-q-and-a/web-qa.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from openai.embeddings_utils import distances_from_embeddings, cosine_similarity
1818

1919
# Regex pattern to match a URL
20-
HTTP_URL_PATTERN = r'^http[s]*://.+'
20+
HTTP_URL_PATTERN = r'^http[s]{0,1}://.+$'
2121

2222
# Define root domain to crawl
2323
domain = "openai.com"

0 commit comments

Comments
 (0)