langchain
langchain copied to clipboard
GraphQL example notebook not working
System Info
Colab standard Python 3 backend
Who can help?
@O-Roma
Information
- [X] The official example notebooks/scripts
- [ ] My own modified scripts
Related Components
- [ ] LLMs/Chat Models
- [ ] Embedding Models
- [ ] Prompts / Prompt Templates / Prompt Selectors
- [ ] Output Parsers
- [ ] Document Loaders
- [ ] Vector Stores / Retrievers
- [ ] Memory
- [ ] Agents / Agent Executors
- [X] Tools / Toolkits
- [ ] Chains
- [ ] Callbacks/Tracing
- [ ] Async
Reproduction
- Open GraphQL example notebook in colab
- Add langchain and openai to the pip install statement
- add environment variable for OPENAI_API_KEY
- Run the notebook
Got the following error
ValidationError: 3 validation errors for GraphQLAPIWrapper
gql_client
field required (type=value_error.missing)
gql_function
field required (type=value_error.missing)
__root__
Could not import gql python package. Please install it with `pip install gql`. (type=value_error)
Expected behavior
The example should probably work.
gql isn't a core dependency so you have to install it separately
gql is installed via pip in the notebook along httpx
Hi, @cgrotz! I'm Dosu, and I'm helping the LangChain team manage their backlog. I wanted to let you know that we are marking this issue as stale.
From what I understand, the issue you reported was about the GraphQL example notebook not working due to a validation error and a missing gql python package. There was some discussion in the comments, with dev2049 suggesting installing gql separately, but you mentioned that gql is installed via pip in the notebook along with httpx.
However, it seems that the issue has been resolved. You mentioned that gql is installed via pip in the notebook along with httpx, so the missing gql package should not be a problem anymore.
Before we close this issue, we wanted to check with you if it is still relevant to the latest version of the LangChain repository. If it is, please let us know by commenting on the issue. Otherwise, feel free to close the issue yourself, or it will be automatically closed in 7 days.
Thank you for your contribution to the LangChain repository!
I think the issue can be closed now.