Skip to content

Commit 02b6b22

Browse files
committed
Fix CI issues.
1 parent c043545 commit 02b6b22

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

openlrc/utils.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Copyright (C) 2024. Hao Zheng
22
# All rights reserved.
33

4-
import gc
54
import re
65
import subprocess
76
import time
@@ -74,7 +73,6 @@ def get_audio_duration(path: Union[str, Path]) -> float:
7473

7574

7675
def release_memory(model: torch.nn.Module) -> None:
77-
gc.collect()
7876
torch.cuda.empty_cache()
7977
del model
8078

tests/test_chatbot.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,23 @@
1010
from openlrc.chatbot import GPTBot, ClaudeBot
1111

1212

13-
class OpenAIUsage(BaseModel):
13+
class Usage(BaseModel):
14+
pass
15+
16+
17+
class OpenAIUsage(Usage):
1418
prompt_tokens: int
1519
completion_tokens: int
1620
total_tokens: int
1721

1822

19-
class AnthropicUsage(BaseModel):
23+
class AnthropicUsage(Usage):
2024
input_tokens: int
2125
output_tokens: int
2226

2327

2428
class OpenAIResponse(BaseModel):
25-
usage: Union[OpenAIUsage | AnthropicUsage]
29+
usage: Union[Usage]
2630

2731

2832
class TestGPTBot(unittest.TestCase):

0 commit comments

Comments
 (0)