mirror of
https://github.com/hwchase17/langchain.git
synced 2025-07-14 00:47:27 +00:00
Replace enumerate with zip. (#5527)
# Replace enumerate with zip. It's more idiomatic and slightly more readable.
This commit is contained in:
parent
226a7521ed
commit
af41cdfc8b
@ -46,6 +46,6 @@ class CombiningOutputParser(BaseOutputParser):
|
||||
"""Parse the output of an LLM call."""
|
||||
texts = text.split("\n\n")
|
||||
output = dict()
|
||||
for i, parser in enumerate(self.parsers):
|
||||
output.update(parser.parse(texts[i].strip()))
|
||||
for txt, parser in zip(texts, self.parsers):
|
||||
output.update(parser.parse(txt.strip()))
|
||||
return output
|
||||
|
Loading…
Reference in New Issue
Block a user