Skip to content

Commit

Permalink
Merge pull request #341 from gitautoai/wes
Browse files Browse the repository at this point in the history
Replace o1-preview with o1-mini as o1-mini codes better than o1-preview
  • Loading branch information
hiroshinishio authored Oct 26, 2024
2 parents 035484d + da08e23 commit 1b953a0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def get_env_var(name: str) -> str:
OPENAI_MAX_TOOL_OUTPUTS_SIZE = 512 * 1024 # in bytes
OPENAI_MAX_TOKENS = 4096
OPENAI_MODEL_ID_O1_PREVIEW = "o1-preview" # https://platform.openai.com/docs/models/o1
# OPENAI_MODEL_ID_O1_MINI = "o1-mini" # https://platform.openai.com/docs/models/o1
OPENAI_MODEL_ID_O1_MINI = "o1-mini" # https://platform.openai.com/docs/models/o1
OPENAI_MODEL_ID_GPT_4O = "gpt-4o" # https://platform.openai.com/docs/models/gpt-4o
OPENAI_ORG_ID: str = get_env_var(name="OPENAI_ORG_ID")
OPENAI_TEMPERATURE = 0.0
Expand Down
4 changes: 2 additions & 2 deletions services/openai/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from openai.types.chat import ChatCompletion

# Local imports
from config import OPENAI_MODEL_ID_O1_PREVIEW
from config import OPENAI_MODEL_ID_O1_MINI
from services.openai.init import create_openai_client
from services.openai.truncate import truncate_message
from utils.handle_exceptions import handle_exceptions
Expand All @@ -25,7 +25,7 @@ def chat_with_ai(system_input: str, user_input: str) -> str:
"content": truncated_msg if truncated_msg else user_input,
},
],
model=OPENAI_MODEL_ID_O1_PREVIEW,
model=OPENAI_MODEL_ID_O1_MINI,
n=1,
# temperature=OPENAI_TEMPERATURE, # temperature should be 0 but it is not supported for 01-mini as of Oct 5 2024
)
Expand Down

0 comments on commit 1b953a0

Please sign in to comment.