Skip to content

Commit

Permalink
Allowed dumping messages with no content to dump ToolRequestMessages
Browse files Browse the repository at this point in the history
  • Loading branch information
maykcaldas committed Jan 28, 2025
1 parent dac0469 commit 103a3c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llmclient/llms.py
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ async def acompletion(self, messages: list[Message], **kwargs) -> list[LLMResult
# cast is necessary for LiteLLM typing bug: https://github.com/BerriAI/litellm/issues/7641
prompts = cast(
list[litellm.types.llms.openai.AllMessageValues],
[m.model_dump(by_alias=True) for m in messages if m.content],
[m.model_dump(by_alias=True) for m in messages],
)
completions = await track_costs(self.router.acompletion)(
self.name, prompts, **kwargs
Expand Down

0 comments on commit 103a3c7

Please sign in to comment.