Skip to content

Commit

Permalink
Merge pull request #137 from cvaske/chagpt-model-update
Browse files Browse the repository at this point in the history
Adding January 2024 ChatGPT models
  • Loading branch information
rgbkrk authored Feb 28, 2024
2 parents f063fd7 + 1edf961 commit 1cce85a
Showing 1 changed file with 6 additions and 16 deletions.
22 changes: 6 additions & 16 deletions chatlab/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@

class ChatModel(Enum):
"""Models available for use with chatlab."""

GPT_4_TURBO_PREVIEW = "gpt-4-turbo-preview"
GPT_4_0125_PREVIEW = "gpt-4-0125-preview"
GPT_4_1106_PREVIEW = "gpt-4-1106-preview"
GPT_4_VISION_PREVIEW = "gpt-4-vision-preview"

Expand All @@ -17,21 +18,7 @@ class ChatModel(Enum):
GPT_3_5_TURBO_0613 = "gpt-3.5-turbo-0613"
GPT_3_5_TURBO_16K = "gpt-3.5-turbo-16k"
GPT_3_5_TURBO_16K_0613 = "gpt-3.5-turbo-16k-0613"


#
# From https://platform.openai.com/docs/guides/gpt/function-calling, the docs say
# that gpt-3.5-turbo-0613 and gpt-4-0613 models support function calling.
# Experimentally, gpt-3.5-turbo-16k also supports function calling.
#
# TODO: Determine if gpt-4-32k supports function calling.
#
class FunctionCompatibleModel(Enum):
"""Models available for use with chatlab."""

GPT_3_5_TURBO_0613 = "gpt-3.5-turbo-0613"
GPT_3_5_TURBO_16K_0613 = "gpt-3.5-turbo-16k-0613"
GPT_4_0613 = "gpt-4-0613"
GPT_3_5_TURBO_0125 = "gpt-3.5-turbo-0125"


# Exporting for the convenience of typing e.g. models.GPT_4_0613
Expand All @@ -43,6 +30,9 @@ class FunctionCompatibleModel(Enum):
GPT_3_5_TURBO_0613 = ChatModel.GPT_3_5_TURBO_0613.value
GPT_3_5_TURBO_16K = ChatModel.GPT_3_5_TURBO_16K.value
GPT_3_5_TURBO_16K_0613 = ChatModel.GPT_3_5_TURBO_16K_0613.value
GPT_3_5_TURBO_0125 = ChatModel.GPT_3_5_TURBO_0125.value

GPT_4_TURBO_PREVIEW = ChatModel.GPT_4_TURBO_PREVIEW.value
GPT_4_0125_PREVIEW = ChatModel.GPT_4_0125_PREVIEW.value
GPT_4_1106_PREVIEW = ChatModel.GPT_4_1106_PREVIEW.value
GPT_4_VISION_PREVIEW = ChatModel.GPT_4_VISION_PREVIEW.value

0 comments on commit 1cce85a

Please sign in to comment.