forked from langchain-ai/langchain
-
Notifications
You must be signed in to change notification settings - Fork 41
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
Update tavily_search_api.py #87
Merged
ShorthillsAI
merged 5 commits into
shorthills-ai:master
from
SanskarTanwarShorthillsAI:master
Oct 19, 2023
Merged
Update tavily_search_api.py #87
ShorthillsAI
merged 5 commits into
shorthills-ai:master
from
SanskarTanwarShorthillsAI:master
Oct 19, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
feat: Raise KeyError when 'prompt' key is missing in JSON response This commit updates the error handling in the code to raise a KeyError when the 'prompt' key is not found in the JSON response. This change makes the code more explicit about the nature of the error, helping to improve clarity and debugging.
ValueError Must be ImportError
ShorthillsAI
approved these changes
Oct 16, 2023
ShorthillsAI
force-pushed
the
master
branch
2 times, most recently
from
October 19, 2023 06:52
1c270f6
to
77fc2f7
Compare
ShorthillsAI
added a commit
that referenced
this pull request
Dec 26, 2023
* Update tavily_search_api.py (#87) * Update modal.py feat: Raise KeyError when 'prompt' key is missing in JSON response This commit updates the error handling in the code to raise a KeyError when the 'prompt' key is not found in the JSON response. This change makes the code more explicit about the nature of the error, helping to improve clarity and debugging. * Update tavily_search_api.py ValueError Must be ImportError --------- Co-authored-by: Aashish Saini <[email protected]> * Update faker_presidio_mapping.py (#93) * Update modal.py feat: Raise KeyError when 'prompt' key is missing in JSON response This commit updates the error handling in the code to raise a KeyError when the 'prompt' key is not found in the JSON response. This change makes the code more explicit about the nature of the error, helping to improve clarity and debugging. * Update faker_presidio_mapping.py lambda was written twice, I have corrected the same * Update base_moderation.py Rectified input to input_text --------- Co-authored-by: Aashish Saini <[email protected]> * Logical and grammatical error in prompt_llm_parser.ipynb (#95) * Update modal.py feat: Raise KeyError when 'prompt' key is missing in JSON response This commit updates the error handling in the code to raise a KeyError when the 'prompt' key is not found in the JSON response. This change makes the code more explicit about the nature of the error, helping to improve clarity and debugging. * prompt_llm_parser.ipynb --------- Co-authored-by: Aashish Saini <[email protected]> * fixed index.mdx (#92) * Update modal.py feat: Raise KeyError when 'prompt' key is missing in JSON response This commit updates the error handling in the code to raise a KeyError when the 'prompt' key is not found in the JSON response. This change makes the code more explicit about the nature of the error, helping to improve clarity and debugging. * fixed index.mdx Fixed grammatical error in file index.mdx. Changed 'it's' to 'it is'. I would like to emphasize that your feedback is immensely valuable to us and is truly treasured. We greatly appreciate your insights and input, as they help us improve and grow. Gratitude @baskaryan @hwchase17 --------- Co-authored-by: Aashish Saini <[email protected]> * Updated debugging.md with grammatical corrections (#96) * Update modal.py feat: Raise KeyError when 'prompt' key is missing in JSON response This commit updates the error handling in the code to raise a KeyError when the 'prompt' key is not found in the JSON response. This change makes the code more explicit about the nature of the error, helping to improve clarity and debugging. * Updated debugging.md with grammatical corrections "There's a number of callbacks" was grammatically incorrect and is replaced with "There are a...". There was a typographical error in the subheading. It was written as "set_vebose = True". --------- Co-authored-by: Aashish Saini <[email protected]> * Update baidu_qianfan_endpoint.py (#94) * Update modal.py feat: Raise KeyError when 'prompt' key is missing in JSON response This commit updates the error handling in the code to raise a KeyError when the 'prompt' key is not found in the JSON response. This change makes the code more explicit about the nature of the error, helping to improve clarity and debugging. * Update baidu_qianfan_endpoint.py Import Error was used as Exception, but value error was raised so changed ValueError to ImportError * Update databricks.py Updated the raised ValueError to ImportError --------- Co-authored-by: Aashish Saini <[email protected]> * Update faker_presidio_mapping.py Fixing Lint Issues * Update faker_presidio_mapping.py * Update faker_presidio_mapping.py * Update faker_presidio_mapping.py * Update faker_presidio_mapping.py * Update faker_presidio_mapping.py * Update faker_presidio_mapping.py * Update faker_presidio_mapping.py * simplified a sentence, updated walkthrough.ipynb (#100) * Update modal.py feat: Raise KeyError when 'prompt' key is missing in JSON response This commit updates the error handling in the code to raise a KeyError when the 'prompt' key is not found in the JSON response. This change makes the code more explicit about the nature of the error, helping to improve clarity and debugging. * simplified a sentence in walkthrough.ipynb a minute adjustment in the sentence to make the message being conveyed more understandable. --------- Co-authored-by: Aashish Saini <[email protected]> * Update paul_graham_essay.txt (Grammatical error) (#91) * Update modal.py feat: Raise KeyError when 'prompt' key is missing in JSON response This commit updates the error handling in the code to raise a KeyError when the 'prompt' key is not found in the JSON response. This change makes the code more explicit about the nature of the error, helping to improve clarity and debugging. * Update paul_graham_essay.txt (Grammatical error) Replaced "till" with "until." on line "The book, On Lisp, wasn't published till 1993, but I wrote much of it in grad school." --------- Co-authored-by: Aashish Saini <[email protected]> * Update CONTRIBUTING.md (#98) Change the 'c' in 'Langchain' to 'C' to form 'LangChain.' In the official documentation, it is written as 'LangChain. * Updated xml_agent.ipynb. Missing Apostrophe added (#97) There was a grammatical error. An apostrophe was missing in all the whats and it has been corrected to what's. * Space missing (#90) * Update modal.py feat: Raise KeyError when 'prompt' key is missing in JSON response This commit updates the error handling in the code to raise a KeyError when the 'prompt' key is not found in the JSON response. This change makes the code more explicit about the nature of the error, helping to improve clarity and debugging. * space missing The space between the words 'JSON' and 'Schema' was missing. * Update interface.ipynb --------- Co-authored-by: Aashish Saini <[email protected]> * Update walkthrough.ipynb * Update paul_graham_essay.txt * Update CONTRIBUTING.md * Update index.md * Update CONTRIBUTING.md --------- Co-authored-by: Sanskar Tanwar <[email protected]> Co-authored-by: Aashish Saini <[email protected]> Co-authored-by: UpneetShorthillsAI <[email protected]> Co-authored-by: HarshGuptaShorthillsAI <[email protected]> Co-authored-by: AdityaKalraShorthillsAI <[email protected]> Co-authored-by: SakshiShorthillsAI <[email protected]> Co-authored-by: AashiGuptaShorthillsAI <[email protected]> Co-authored-by: ShamshadAhmedShorthillsAI <[email protected]>
AkshayTripathiShorthillsAI
pushed a commit
to AkshayTripathiShorthillsAI/langchain
that referenced
this pull request
Jan 16, 2024
* Update modal.py feat: Raise KeyError when 'prompt' key is missing in JSON response This commit updates the error handling in the code to raise a KeyError when the 'prompt' key is not found in the JSON response. This change makes the code more explicit about the nature of the error, helping to improve clarity and debugging. * Update tavily_search_api.py ValueError Must be ImportError --------- Co-authored-by: Aashish Saini <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I replaced the
ValueError
exception withImportError
in thetavily_search_api.py
file. This change enhances the exception handling when attempting to import thetavily
package.Previously, a
ValueError
was raised when thetavily
package was not found during import. However, a more appropriate exception to raise in this case isImportError
, which is commonly used for import-related issues.With this change, if the
tavily
package is not found, the script will now raise anImportError
with a clear error message instructing users to install the package usingpip install tavily-python
.This update improves the code's readability and ensures that users are provided with accurate instructions when the required package is missing.
Please review the change at your convenience.
@ShorthillsAI