Skip to content

Commit 3b3a1a4

Browse files
committed
Add more GPT O series model
1 parent 3a2ce73 commit 3b3a1a4

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/gptbot.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212

1313
ENGINES = ["gpt-3.5-turbo", "gpt-4", "gpt-4-32k", "gpt-4-turbo"]
1414

15-
GPT_O1_MODEL = ["o1-preview", "o1-mini", "o1", "o3-mini"]
15+
# GPT O-series models
16+
GPT_O_MODEL = ["o1-preview", "o1-mini", "o1", "o1-pro", "o3-mini", "o3", "o4-mini"]
1617

1718

1819
class Chatbot:
@@ -296,7 +297,7 @@ async def ask_async_v2(
296297
self.__truncate_conversation(convo_id=convo_id)
297298
# Get response
298299
# o1 beta-limitations
299-
if self.engine in GPT_O1_MODEL:
300+
if self.engine in GPT_O_MODEL:
300301
response = await self.aclient.post(
301302
url=self.api_url,
302303
headers={"Authorization": f"Bearer {kwargs.get('api_key', self.api_key)}"},
@@ -349,7 +350,7 @@ def reset(self, convo_id: str = "default", system_prompt: str = None) -> None:
349350
Reset the conversation
350351
"""
351352
# o1 beta-limitations
352-
if self.engine in GPT_O1_MODEL:
353+
if self.engine in GPT_O_MODEL:
353354
self.conversation[convo_id] = []
354355
else:
355356
self.conversation[convo_id] = [
@@ -366,7 +367,7 @@ async def oneTimeAsk(
366367
**kwargs,
367368
) -> str:
368369
# o1 beta-limitations
369-
if self.engine in GPT_O1_MODEL:
370+
if self.engine in GPT_O_MODEL:
370371
response = await self.aclient.post(
371372
url=self.api_url,
372373
json={

0 commit comments

Comments
 (0)