mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 11:43:54 +00:00
bug fixes
This commit is contained in:
parent
d9eb7a248f
commit
b65a1d4c9c
8 changed files with 3 additions and 5 deletions
BIN
dist/litellm-0.1.630-py3-none-any.whl
vendored
Normal file
BIN
dist/litellm-0.1.630-py3-none-any.whl
vendored
Normal file
Binary file not shown.
BIN
dist/litellm-0.1.630.tar.gz
vendored
Normal file
BIN
dist/litellm-0.1.630.tar.gz
vendored
Normal file
Binary file not shown.
BIN
dist/litellm-0.1.631-py3-none-any.whl
vendored
Normal file
BIN
dist/litellm-0.1.631-py3-none-any.whl
vendored
Normal file
Binary file not shown.
BIN
dist/litellm-0.1.631.tar.gz
vendored
Normal file
BIN
dist/litellm-0.1.631.tar.gz
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -180,10 +180,6 @@ class Logging:
|
||||||
# Log the exact input to the LLM API
|
# Log the exact input to the LLM API
|
||||||
print_verbose(f"Logging Details Pre-API Call for call id {self.litellm_call_id}")
|
print_verbose(f"Logging Details Pre-API Call for call id {self.litellm_call_id}")
|
||||||
try:
|
try:
|
||||||
if start_time is None:
|
|
||||||
start_time = self.start_time
|
|
||||||
if end_time is None:
|
|
||||||
end_time = datetime.datetime.now()
|
|
||||||
# print_verbose(f"logging pre call for model: {self.model} with call type: {self.call_type}")
|
# print_verbose(f"logging pre call for model: {self.model} with call type: {self.call_type}")
|
||||||
self.model_call_details["input"] = input
|
self.model_call_details["input"] = input
|
||||||
self.model_call_details["api_key"] = api_key
|
self.model_call_details["api_key"] = api_key
|
||||||
|
@ -207,6 +203,8 @@ class Logging:
|
||||||
)
|
)
|
||||||
|
|
||||||
if litellm.max_budget and self.stream:
|
if litellm.max_budget and self.stream:
|
||||||
|
start_time = self.start_time
|
||||||
|
end_time = self.start_time # no time has passed as the call hasn't been made yet
|
||||||
time_diff = (end_time - start_time).total_seconds()
|
time_diff = (end_time - start_time).total_seconds()
|
||||||
float_diff = float(time_diff)
|
float_diff = float(time_diff)
|
||||||
litellm._current_cost += litellm.completion_cost(model=self.model, prompt="".join(message["content"] for message in self.messages), completion="", total_time=float_diff)
|
litellm._current_cost += litellm.completion_cost(model=self.model, prompt="".join(message["content"] for message in self.messages), completion="", total_time=float_diff)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "litellm"
|
name = "litellm"
|
||||||
version = "0.1.630"
|
version = "0.1.632"
|
||||||
description = "Library to easily interface with LLM API providers"
|
description = "Library to easily interface with LLM API providers"
|
||||||
authors = ["BerriAI"]
|
authors = ["BerriAI"]
|
||||||
license = "MIT License"
|
license = "MIT License"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue