mirror of https://github.com/hwchase17/langchain
handle missing finish_reason (#7296)
In some cases, the OpenAI response is missing the `finish_reason` attribute. It seems to happen when using Ada or Babbage and `stream=true`, but I can't always reproduce it. This change just gracefully handles the missing key.pull/7293/head
parent
6ff9e9b34a
commit
1a4ca3eff9
Loading…
Reference in New Issue