Skip to content

Commit

Permalink
Update test suites.
Browse files Browse the repository at this point in the history
  • Loading branch information
zh-plus committed Feb 29, 2024
1 parent 2321ad0 commit 69dcc28
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_chatbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def test_estimate_fee(self):
{'role': 'user', 'content': 'Hello'},
]
fee = bot.estimate_fee(messages)
assert isclose(fee, 1e-05)
assert isclose(fee, 6e-06)

def test_update_fee(self):
bot = self.bot
Expand All @@ -46,7 +46,7 @@ def test_update_fee(self):
response3 = OpenAIResponse(usage=CompletionUsage(prompt_tokens=300, completion_tokens=600, total_tokens=900))
bot.update_fee(response3)

assert bot.api_fees == [0.0005, 0.001, 0.0015]
assert bot.api_fees == [0.00035, 0.0007, 0.0010500000000000002]

def test_message_async(self):
bot = self.bot
Expand Down

0 comments on commit 69dcc28

Please sign in to comment.