langchain-openai[patch]: Add ruff bandit rules to linter (#31788)

This commit is contained in:
Mason Daugherty
2025-06-30 14:01:32 -04:00
committed by GitHub
parent 645e25f624
commit 33c9bf1adc
4 changed files with 23 additions and 13 deletions

View File

@@ -310,7 +310,8 @@ class BaseOpenAI(BaseLLM):
generation = chunk
else:
generation += chunk
assert generation is not None
if generation is None:
raise ValueError("Generation is empty after streaming.")
choices.append(
{
"text": generation.text,
@@ -378,7 +379,8 @@ class BaseOpenAI(BaseLLM):
generation = chunk
else:
generation += chunk
assert generation is not None
if generation is None:
raise ValueError("Generation is empty after streaming.")
choices.append(
{
"text": generation.text,