Skip to content

Commit 091a37a

Browse files
authored
[FIX] Include support for tokens and costs for AWS Bedrock models (#189)
Added input and output token variables in token_counter.py for aws bedrock
1 parent bb327e8 commit 091a37a

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/unstract/sdk/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "v0.73.0"
1+
__version__ = "v0.73.1"
22

33

44
def get_sdk_version() -> str:

src/unstract/sdk/utils/token_counter.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,13 @@ def _get_tokens_from_response(
9595
"prompt_tokens",
9696
"input_tokens",
9797
"prompt_eval_count",
98+
"inputTokens",
9899
)
99100
possible_output_keys = (
100101
"completion_tokens",
101102
"output_tokens",
102103
"eval_count",
104+
"outputTokens",
103105
)
104106

105107
prompt_tokens = 0

0 commit comments

Comments
 (0)