Skip to content

Commit

Permalink
v0.0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
MadcowD committed Sep 23, 2024
1 parent fac77b2 commit 5243a68
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
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 = "ell-ai"
version = "0.0.7"
version = "0.0.9"
description = "ell - the language model programming library"
authors = ["William Guss <[email protected]>"]
license = "MIT"
Expand Down
4 changes: 2 additions & 2 deletions src/ell/lmp/_track.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ def tracked_func(*fn_args, _get_invocation_id=False, **fn_kwargs) -> str:
)
latency_ms = (utc_now() - _start_time).total_seconds() * 1000
usage = metadata.get("usage", {"prompt_tokens": 0, "completion_tokens": 0})
prompt_tokens= usage.get("prompt_tokens", 0)
completion_tokens= usage.get("completion_tokens", 0)
prompt_tokens= usage.get("prompt_tokens", 0) if usage else 0
completion_tokens= usage.get("completion_tokens", 0) if usage else 0


#XXX: cattrs add invocation origin here recursively on all pirmitive types within a message.
Expand Down

0 comments on commit 5243a68

Please sign in to comment.