Skip to content

Commit 39e38be

Browse files
authored
Merge pull request #417 from LlmKira/dev
🔧 refactor: update default API tool model to "gpt-4o-mini" in credent…
2 parents de6824a + 9ad0935 commit 39e38be

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

app/components/credential.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class Credential(BaseModel):
1414
api_key: str
1515
api_endpoint: str
1616
api_model: str
17-
api_tool_model: str = "gpt-3.5-turbo"
17+
api_tool_model: str = "gpt-4o-mini"
1818

1919
@classmethod
2020
def from_provider(cls, token, provider_url):
@@ -36,7 +36,7 @@ def from_provider(cls, token, provider_url):
3636
api_key=user_data["api_key"],
3737
api_endpoint=user_data["api_endpoint"],
3838
api_model=user_data["api_model"],
39-
api_tool_model=user_data.get("api_tool_model", "gpt-3.5-turbo"),
39+
api_tool_model=user_data.get("api_tool_model", "gpt-4o-mini"),
4040
)
4141

4242

@@ -47,8 +47,8 @@ def from_provider(cls, token, provider_url):
4747
global_credential = Credential(
4848
api_key=os.getenv("GLOBAL_OAI_KEY"),
4949
api_endpoint=os.getenv("GLOBAL_OAI_ENDPOINT"),
50-
api_model=os.getenv("GLOBAL_OAI_MODEL", "gpt-3.5-turbo"),
51-
api_tool_model=os.getenv("GLOBAL_OAI_TOOL_MODEL", "gpt-3.5-turbo"),
50+
api_model=os.getenv("GLOBAL_OAI_MODEL", "gpt-4o-mini"),
51+
api_tool_model=os.getenv("GLOBAL_OAI_TOOL_MODEL", "gpt-4o-mini"),
5252
)
5353
else:
5454
global_credential = None

app/sender/discord/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ async def listen_endpoint_command(
287287
api_endpoint: str,
288288
api_key: str,
289289
api_model: str,
290-
api_tool_model: str = "gpt-3.5-turbo",
290+
api_tool_model: str = "gpt-4o-mini",
291291
):
292292
try:
293293
credential = Credential(

app/sender/kook/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -297,8 +297,8 @@ async def listen_login_command(
297297
msg: Message,
298298
api_endpoint: str,
299299
api_key: str,
300-
api_model: str = "gpt-3.5-turbo",
301-
api_tool_model: str = "gpt-3.5-turbo",
300+
api_model: str = "gpt-4o-mini",
301+
api_tool_model: str = "gpt-4o-mini",
302302
):
303303
try:
304304
credential = Credential(

app/sender/util_func.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ async def login(uid: str, arg_string) -> str:
170170
error = telegramify_markdown.convert(
171171
"🔑 **Incorrect format.**\n"
172172
"You can set it via `/login https://<something api.openai.com>/v1$<api key>"
173-
"$<model such as gpt-4-turbo>$<tool_model such as gpt-3.5-turbo>` format, "
173+
"$<model such as gpt-4-turbo>$<tool_model such as gpt-4o-mini>` format, "
174174
"or you can log in via URL using `/login token$https://provider.com`.\n"
175175
"Use $ to separate the parameters."
176176
)
@@ -202,7 +202,7 @@ async def login(uid: str, arg_string) -> str:
202202
if len(settings) == 4:
203203
api_tool_model = settings[3]
204204
else:
205-
api_tool_model = "gpt-3.5-turbo"
205+
api_tool_model = "gpt-4o-mini"
206206
credential = Credential(
207207
api_endpoint=api_endpoint,
208208
api_key=api_key,

0 commit comments

Comments
 (0)