Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

weezerpedia function call #42

Merged

Conversation

hh2010
Copy link
Contributor

@hh2010 hh2010 commented Nov 12, 2024

addresses #7

tested locally and it works. checked that slash command still works as well.
however im noticing that sometimes it fails to query for "make believe" during my testing. not sure why but can just keep an eye on it and see if its something to improve on.

@hh2010 hh2010 closed this Nov 12, 2024
@hh2010 hh2010 reopened this Nov 12, 2024
@@ -50,6 +50,9 @@ def wiki_to_markdown(text, wiki_url_prefix='https://www.weezerpedia.com/wiki/'):
# Trim any leading or trailing whitespaces
text = text.strip()

url_pattern = r'http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\\(\\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+'
Copy link
Contributor Author

@hh2010 hh2010 Nov 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the URLs just take up character limit and dont add value to response since gpt cannot traverse them
so i add a param to remove them when used for gpt function call

@hh2010
Copy link
Contributor Author

hh2010 commented Nov 14, 2024

@riverscuomo should be good for review, lmk if any thoughts

@riverscuomo riverscuomo merged commit 3f2b1a6 into riverscuomo:main Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants