-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Unknown
-
Affects Version/s: None
-
None
As reported in https://github.com/langchain-ai/langchain-mongodb/issues/163, our parsing logic is expecting a JSON value, so the following gives an error:
Error: ValueError('Cannot execute command db.contracts.aggregate([ { "$match":
{ "contractType1": ObjectId("685ce918a1903cacfd052234") }}, { "$project":
{ "contractName": 1, "contract_prefix": 1, "contractStatus": 1, "contractExpiry": 1, "effectiveDate": 1 }}, { "$sort":
{ "createdAt": -1 }}, { "$limit": 5 } ])')
We should be able to handle ObjectId values in
MongoDBDatabase._parse_command, despite our LLM prompt asking for JSON values.