langchain
a8104ea8 - openai[patch]: add checking codes for calling AI model get error (#17909)

Commit
1 year ago
openai[patch]: add checking codes for calling AI model get error (#17909) **Description:**: adding checking codes for calling AI model get error in chat_models/base.py and llms/base.py **Issue**: Sometimes the AI Model calling will get error, we should raise it. Otherwise, the next code 'choices.extend(response["choices"])' will throw a "TypeError: 'NoneType' object is not iterable" error to mask the true error. Because 'response["choices"]' is None. **Dependencies**: None --------- Co-authored-by: yangkx <yangkx@asiainfo-int.com> Co-authored-by: Bagatur <22008038+baskaryan@users.noreply.github.com>
Author
Parents
Loading