Skip to content

Commit

Permalink
Add count tokens param in base class
Browse files Browse the repository at this point in the history
  • Loading branch information
bkiat1123 committed Feb 28, 2024
1 parent cfde824 commit 9ffa28c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions llms/providers/base_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ def compute_cost(self, prompt_tokens: int, completion_tokens: int) -> float:
cost = round(cost, 5)
return cost

def count_tokens(self):
def count_tokens(self, content):
raise NotImplementedError(
f"Count tokens is currently not supported with {self.__name__}"
)

def complete(self):
def complete(self, *args, **kwargs):
raise NotImplementedError

async def acomplete(self):
Expand Down

0 comments on commit 9ffa28c

Please sign in to comment.