mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-06 21:43:44 +00:00
langchain-openai[patch]: Add ruff bandit rules to linter (#31788)
This commit is contained in:
@@ -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,
|
||||
|
Reference in New Issue
Block a user