community[patch]: chat model mypy fixes (#17061)

Related to #17048
This commit is contained in:
Bagatur
2024-02-05 13:42:59 -08:00
committed by GitHub
parent d93de71d08
commit 66e45e8ab7
17 changed files with 101 additions and 89 deletions

View File

@@ -327,7 +327,7 @@ class ChatDeepInfra(BaseChatModel):
if chunk:
yield ChatGenerationChunk(message=chunk, generation_info=None)
if run_manager:
run_manager.on_llm_new_token(chunk.content) # type: ignore[arg-type]
run_manager.on_llm_new_token(str(chunk.content))
async def _astream(
self,
@@ -349,7 +349,7 @@ class ChatDeepInfra(BaseChatModel):
if chunk:
yield ChatGenerationChunk(message=chunk, generation_info=None)
if run_manager:
await run_manager.on_llm_new_token(chunk.content) # type: ignore[arg-type]
await run_manager.on_llm_new_token(str(chunk.content))
async def _agenerate(
self,