Skip to content

Commit

Permalink
feat: add support for gpt-4o-mini
Browse files Browse the repository at this point in the history
  • Loading branch information
gventuri committed Jul 18, 2024
1 parent 1ee9567 commit 391e717
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions pandasai/helpers/openai_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
"gpt-4-1106-preview": 0.01,
"gpt-4o": 0.005,
"gpt-4o-2024-05-13": 0.005,
"gpt-4o-mini": 0.00015,
"gpt-4o-mini-2024-07-18": 0.00015,
"gpt-4-32k": 0.06,
"gpt-4-32k-0613": 0.06,
# GPT-4 output
Expand All @@ -21,6 +23,8 @@
"gpt-4-1106-preview-completion": 0.03,
"gpt-4o-completion": 0.015,
"gpt-4o-2024-05-13-completion": 0.015,
"gpt-4o-mini-completion": 0.00015,
"gpt-4o-mini-2024-07-18-completion": 0.00015,
"gpt-4-32k-completion": 0.12,
"gpt-4-32k-0613-completion": 0.12,
# GPT-3.5 input
Expand Down
4 changes: 3 additions & 1 deletion pandasai/llm/openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,12 @@ class OpenAI(BaseOpenAI):
"gpt-4-turbo-preview",
"gpt-4o",
"gpt-4o-2024-05-13",
"gpt-4o-mini",
"gpt-4o-mini-2024-07-18",
]
_supported_completion_models = ["gpt-3.5-turbo-instruct"]

model: str = "gpt-3.5-turbo"
model: str = "gpt-4o-mini"

def __init__(
self,
Expand Down

0 comments on commit 391e717

Please sign in to comment.