Skip to content

Commit

Permalink
add chatgpt-4o-latest support
Browse files Browse the repository at this point in the history
  • Loading branch information
rishsriv committed Jan 21, 2025
1 parent 6d9f208 commit 8e0745b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions defog_utils/utils_llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from typing import Dict, List, Optional, Any

LLM_COSTS_PER_TOKEN = {
"chatgpt-4o": {"input_cost_per1k": 0.0025, "output_cost_per1k": 0.01},
"gpt-4o": {"input_cost_per1k": 0.0025, "output_cost_per1k": 0.01},
"gpt-4o-mini": {"input_cost_per1k": 0.00015, "output_cost_per1k": 0.0006},
"o1": {"input_cost_per1k": 0.015, "output_cost_per1k": 0.06},
Expand Down
4 changes: 2 additions & 2 deletions defog_utils/utils_multi_llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def map_model_to_chat_fn(model: str) -> Callable:
return chat_anthropic
if model.startswith("gemini"):
return chat_gemini
if model.startswith("gpt") or model.startswith("o1"):
if model.startswith("gpt") or model.startswith("o1") or model.startswith("chatgpt"):
return chat_openai
if model.startswith("deepseek"):
return chat_openai
Expand All @@ -45,7 +45,7 @@ def map_model_to_chat_fn_async(model: str) -> Callable:
return chat_anthropic_async
if model.startswith("gemini"):
return chat_gemini_async
if model.startswith("gpt") or model.startswith("o1"):
if model.startswith("gpt") or model.startswith("o1") or model.startswith("chatgpt"):
return chat_openai_async
if model.startswith("deepseek"):
return chat_openai_async
Expand Down

0 comments on commit 8e0745b

Please sign in to comment.