mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-24 10:14:26 +00:00
(fix) cost calculator for FT: gpt-3.5
This commit is contained in:
parent
b6f8dbbc0e
commit
695eaac542
1 changed files with 3 additions and 3 deletions
|
@ -1587,12 +1587,12 @@ def token_counter(model="", text=None, messages: Optional[List] = None):
|
|||
return num_tokens
|
||||
|
||||
|
||||
def cost_per_token(model="gpt-3.5-turbo", prompt_tokens=0, completion_tokens=0):
|
||||
def cost_per_token(model="", prompt_tokens=0, completion_tokens=0):
|
||||
"""
|
||||
Calculates the cost per token for a given model, prompt tokens, and completion tokens.
|
||||
|
||||
Parameters:
|
||||
model (str): The name of the model to use. Default is "gpt-3.5-turbo".
|
||||
model (str): The name of the model to use. Default is ""
|
||||
prompt_tokens (int): The number of tokens in the prompt.
|
||||
completion_tokens (int): The number of tokens in the completion.
|
||||
|
||||
|
@ -1637,7 +1637,7 @@ def cost_per_token(model="gpt-3.5-turbo", prompt_tokens=0, completion_tokens=0):
|
|||
|
||||
def completion_cost(
|
||||
completion_response=None,
|
||||
model="gpt-3.5-turbo",
|
||||
model=None,
|
||||
prompt="",
|
||||
messages: List = [],
|
||||
completion="",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue