mirror of
https://github.com/hwchase17/langchain.git
synced 2025-10-22 17:50:03 +00:00
partners: (langchain-openai) total_tokens should not add 'Nonetype' t… # PR Description ## Description Fixed an issue in `langchain-openai` where `total_tokens` was incorrectly adding `None` to an integer, causing a TypeError. The fix ensures proper type checking before adding token counts. ## Issue Fixes the TypeError traceback shown in the image where `'NoneType'` cannot be added to an integer. ## Dependencies None ## Twitter handle None  Co-authored-by: qiulijie <qiulijie@yuaiweiwu.com>