Hi guys,
I wanna chat with the data in MongoDB I have succeeded with data that is not stored in MongoDB.
Does anyone have experience in working with LangChain? and connecting OpenAI/ChatGPT to MongoDB with GraphQL API keys?
I have issues connecting to the database because I can’t find a way to add a header/apikey correctly so I don’t get an error 401 “401 Client Error: Unauthorized for url:…”
I have tested with a simple connect with requests, and i worked fine.
requests.post(url, json={‘query’: query}, headers=headers)
LangChain with GQL doc:
Code snippet:
API_KEY = “bdytnQMOwW…6zMZEY”
headers = {“api-key”: API_KEY}
tools = load_tools(
[“graphql”],
graphql_endpoint=“App Services”,
headers=headers
)