mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 10:14:59 +00:00
fix: Adjust input and output cost calculations to use million scale
This commit is contained in:
parent
29587cd07c
commit
4765a90f97
1 changed files with 2 additions and 2 deletions
|
@ -256,8 +256,8 @@ class ModelInfoManager:
|
|||
context_size = None
|
||||
input_cost_match = re.search(r"\$\s*([\d.]+)\s*/M input tokens", text, re.IGNORECASE)
|
||||
output_cost_match = re.search(r"\$\s*([\d.]+)\s*/M output tokens", text, re.IGNORECASE)
|
||||
input_cost = float(input_cost_match.group(1)) if input_cost_match else None
|
||||
output_cost = float(output_cost_match.group(1)) if output_cost_match else None
|
||||
input_cost = float(input_cost_match.group(1)) / 1000000 if input_cost_match else None
|
||||
output_cost = float(output_cost_match.group(1)) / 1000000 if output_cost_match else None
|
||||
params = {
|
||||
"max_input_tokens": context_size,
|
||||
"max_tokens": context_size,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue