patching for non-gpt model

This commit is contained in:
Lorenze Jay
2024-07-24 21:06:35 -07:00
parent 2d086ab596
commit 044301fca2

View File

@@ -23,7 +23,7 @@ class Converter(OutputConverter):
if self.is_gpt:
return self._create_instructor().to_pydantic()
else:
return self._create_chain().invoke({})
return self._create_chain().invoke({"query": self.text})
except Exception as e:
if current_attempt < self.max_attempts:
return self.to_pydantic(current_attempt + 1)