Skip to content

Commit

Permalink
fix too many value to unpack error
Browse files Browse the repository at this point in the history
  • Loading branch information
willydouhard committed Nov 9, 2023
1 parent 79bc7bc commit 8d8791a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions backend/chainlit/langchain/callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ def _get_completion(self, generation: Dict):
else:
return kwargs.get("content", ""), None
else:
return generation.get("text", "")
return generation.get("text", ""), None

def on_chat_model_start(
self,
Expand Down Expand Up @@ -582,7 +582,6 @@ def _on_run_update(self, run: Run) -> None:
)
generations = (run.outputs or {}).get("generations", [])
completion, language = self._get_completion(generations[0][0])

current_prompt = (
self.prompt_sequence.pop() if self.prompt_sequence else None
)
Expand Down

0 comments on commit 8d8791a

Please sign in to comment.