Skip to content

Commit

Permalink
fix # bug (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
amandhe authored Mar 27, 2024
1 parent 2c696d6 commit 7e1494f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions superpipe/clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ def get_client(model):
return client_for_model.get(model)


def set_client_for_model(model, api_key, base_url, #={}):
def set_client_for_model(model, api_key, base_url, #=None):
client_for_model[model] = OpenAI(api_key=api_key, base_url=base_url)
update_#(#)
if # is not None:
update_#({model: #})
2 changes: 1 addition & 1 deletion superpipe/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ def get_cost(prompt_tokens: int, completion_tokens: int, model: str):
"""
# = _#.get(model)
if not # or prompt_tokens is None or completion_tokens is None:
return None
return (0, 0)
return (#[0]*prompt_tokens/1e6, #[1]*completion_tokens/1e6)

0 comments on commit 7e1494f

Please # to comment.