From 9226fda58b94d7600896f2daa559b6cccc928d74 Mon Sep 17 00:00:00 2001 From: felixocker Date: Fri, 21 Jul 2023 00:55:19 +0200 Subject: [PATCH] fix: create schema description from URIs and str w/out rdflib warnings (#8025) - Description: fix to avoid rdflib warnings when concatenating URIs and strings to create the text snippet for the knowledge graph's schema. @marioscrock pointed this out in a comment related to #7165 - Issue: None, but the problem was mentioned as a comment in #7165 - Dependencies: None - Tag maintainer: Related to memory -> @hwchase17, maybe @baskaryan as it is a fix --- langchain/graphs/rdf_graph.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/langchain/graphs/rdf_graph.py b/langchain/graphs/rdf_graph.py index 4efeb4d0b80..a8393d602e2 100644 --- a/langchain/graphs/rdf_graph.py +++ b/langchain/graphs/rdf_graph.py @@ -225,7 +225,7 @@ class RdfGraph: def _res_to_str(self, res: rdflib.query.ResultRow, var: str) -> str: return ( "<" - + res[var] + + str(res[var]) + "> (" + self._get_local_name(res[var]) + ", "