Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "workflowai"
version = "0.3.0"
version = "0.3.1"
description = ""
authors = ["Guillaume Aquilina <guillaume@workflowai.com>"]
readme = "README.md"
Expand Down
16 changes: 10 additions & 6 deletions workflowai/core/domain/llm_usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,22 @@
class LLMUsage(BaseModel):
"""An object to store usage information for the LLM provider"""

prompt_token_count: Optional[int] = Field(
default=None, description="The number of tokens in the prompt",
prompt_token_count: Optional[float] = Field(
default=None,
description="The number of tokens in the prompt",
)
prompt_cost_usd: Optional[float] = Field(
default=None, description="The cost of the prompt in USD",
default=None,
description="The cost of the prompt in USD",
)

completion_token_count: Optional[int] = Field(
default=None, description="The number of tokens in the completion",
completion_token_count: Optional[float] = Field(
default=None,
description="The number of tokens in the completion",
)
completion_cost_usd: Optional[float] = Field(
default=None, description="The cost of the completion in USD",
default=None,
description="The cost of the completion in USD",
)

@property
Expand Down
Loading