-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
feat: Wolfram alpha tool #578
feat: Wolfram alpha tool #578
Conversation
…angchain into wolfram-alpha-tool
def run(self, query: str) -> str: | ||
"""Run query through WolframAlpha and parse result.""" | ||
res = self.wolfram_client.query(query) | ||
# Includes only text from the response |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nickscamara can we return more from the Wolfram response (e.g. the units of the answer)? For example, if you run a query like "How big is the moon?" via LangChain's wrapper, you get back "1079.6", and then LangChain will return "The moon is 1079.6 miles in diameter.", which is incorrect - 1079.6 is actually the radius, not the diameter.
I'm assuming the Wolfram response included that, but it was just dropped by the wrapper?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for that! #584 should now include the assumption.
Issue linked with: #455
Added Wolfram Alpha as a tool.