fix llm cost for gpt4.1 (#2172)
This commit is contained in:
405
poetry.lock
generated
405
poetry.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -9,14 +9,14 @@ packages = [{ include = "skyvern" }, { include = "alembic" }]
|
||||
[tool.poetry.dependencies]
|
||||
python = "^3.11,<3.12"
|
||||
python-dotenv = "^1.0.0"
|
||||
openai = "<1.68"
|
||||
openai = ">=1.68.2"
|
||||
sqlalchemy = {extras = ["mypy"], version = "^2.0.29"}
|
||||
aiohttp = "^3.8.5"
|
||||
python-multipart = "^0.0.6"
|
||||
toml = "^0.10.2"
|
||||
jinja2 = "^3.1.2"
|
||||
uvicorn = {extras = ["standard"], version = "^0.24.0.post1"}
|
||||
litellm = "^1.63.12"
|
||||
litellm = "1.66.1"
|
||||
playwright = "1.46.0"
|
||||
pillow = "^10.1.0"
|
||||
starlette-context = "^0.3.6"
|
||||
|
||||
@@ -160,7 +160,7 @@ class LLMAPIHandlerFactory:
|
||||
try:
|
||||
llm_cost = litellm.completion_cost(completion_response=response)
|
||||
except Exception as e:
|
||||
LOG.exception("Failed to calculate LLM cost", error=str(e))
|
||||
LOG.debug("Failed to calculate LLM cost", error=str(e), exc_info=True)
|
||||
llm_cost = 0
|
||||
prompt_tokens = response.get("usage", {}).get("prompt_tokens", 0)
|
||||
completion_tokens = response.get("usage", {}).get("completion_tokens", 0)
|
||||
@@ -350,7 +350,7 @@ class LLMAPIHandlerFactory:
|
||||
try:
|
||||
llm_cost = litellm.completion_cost(completion_response=response)
|
||||
except Exception as e:
|
||||
LOG.exception("Failed to calculate LLM cost", error=str(e))
|
||||
LOG.debug("Failed to calculate LLM cost", error=str(e), exc_info=True)
|
||||
llm_cost = 0
|
||||
prompt_tokens = response.get("usage", {}).get("prompt_tokens", 0)
|
||||
completion_tokens = response.get("usage", {}).get("completion_tokens", 0)
|
||||
|
||||
Reference in New Issue
Block a user