mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-04-07 11:28:09 +02:00
properly yield non-streaming responses
This commit is contained in:
parent
648f2d06bf
commit
ee6b8b7f50
@ -72,7 +72,8 @@ class LangChainChatLLM(LLM, abc.ABC):
|
||||
self._log_prompt(prompt)
|
||||
|
||||
if DISABLE_LITELLM_STREAMING:
|
||||
return [self.invoke(prompt)]
|
||||
yield self.invoke(prompt)
|
||||
return
|
||||
|
||||
output_tokens = []
|
||||
for token in message_generator_to_string_generator(self.llm.stream(prompt)):
|
||||
|
Loading…
x
Reference in New Issue
Block a user