Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions gpt_oss/responses_api/utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import time

fake_tokens = [
fake_tokens: list[int] = [
200005,
35644,
200008,
Expand Down Expand Up @@ -37,7 +37,7 @@
18583,
200012,
]
fake_tokens = [
fake_tokens: list[int] = [
200005,
35644,
200008,
Expand Down Expand Up @@ -123,12 +123,12 @@
# 198,
# ]

token_queue = fake_tokens.copy()
token_queue: list[int] = fake_tokens.copy()


def stub_infer_next_token(tokens: list[int], temperature: float = 0.0) -> int:
global token_queue
next_tok = token_queue.pop(0)
next_tok: int = token_queue.pop(0)
if len(token_queue) == 0:
token_queue = fake_tokens.copy()
time.sleep(0.1)
Expand Down