Skip to content

Commit

Permalink
black
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-bernstein committed Oct 25, 2024
1 parent 136bc94 commit a722106
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
3 changes: 2 additions & 1 deletion adala/runtimes/_litellm.py
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,8 @@ def get_cost_estimate(
) -> CostEstimate:
try:
user_prompts = [
partial_str_format(prompt, **substitution) for substitution in substitutions
partial_str_format(prompt, **substitution)
for substitution in substitutions
]
cumulative_prompt_cost = 0
cumulative_completion_cost = 0
Expand Down
8 changes: 2 additions & 6 deletions tests/test_cost_estimation.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,8 @@
import pytest
from adala.runtimes._litellm import AsyncLiteLLMChatRuntime
from adala.runtimes.base import CostEstimate
from adala.agents import Agent
from adala.skills import ClassificationSkill
import numpy as np
import os
from fastapi.testclient import TestClient
from server.app import app, CostEstimateRequest

OPENAI_API_KEY = os.getenv("OPENAI_API_KEY")

Expand Down Expand Up @@ -60,7 +56,7 @@ def test_estimate_cost_endpoint(client):
}
},
},
"prompt": '''
"prompt": """
test {text}
Use the following JSON format:
Expand All @@ -72,7 +68,7 @@ def test_estimate_cost_endpoint(client):
}
]
}
''',
""",
"substitutions": [{"text": "test"}],
}
resp = client.post(
Expand Down

0 comments on commit a722106

Please sign in to comment.