Skip to content

Commit

Permalink
Merge pull request #9 from wgj/master
Browse files Browse the repository at this point in the history
Add GPT4o model
  • Loading branch information
sabeechen authored May 24, 2024
2 parents d0ab63d + 8674709 commit aeb0ff6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion server/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
GPT3 = 'gpt-3.5-turbo-1106'
GPT4 = 'gpt-4'
GPT4_TURBO = 'gpt-4-0125-preview'
GPT4_O = 'gpt-4o'


@dataclass
Expand Down Expand Up @@ -59,7 +60,9 @@ def tokenCount(self, content: Union[str, Dict[str, str], List[Dict[str, str]]])
MODELS: Dict[str, OpenAiModel] = {
GPT3: OpenAiModel(GPT3, "GPT3", 0.002 / 1000, 0.001 / 1000, 1024 * 16 - 1, tiktoken.encoding_for_model(GPT3)),
GPT4: OpenAiModel(GPT4, "GPT4", 0.06 / 1000, 0.03 / 1000, 1024 * 8 - 1, tiktoken.encoding_for_model(GPT4)),
GPT4_TURBO: OpenAiModel(GPT4_TURBO, "GPT4 Turbo", 0.01 / 1000, 0.03 / 1000, 128 * 1000 - 1, tiktoken.encoding_for_model(GPT4_TURBO))
GPT4_TURBO: OpenAiModel(GPT4_TURBO, "GPT4 Turbo", 0.01 / 1000, 0.03 / 1000, 128 * 1000 - 1, tiktoken.encoding_for_model(GPT4_TURBO)),
GPT4_O: OpenAiModel(GPT4_O, "GPT4o", 0.005 / 1000, 0.015 / 1000, 128 * 1000 - 1, tiktoken.encoding_for_model(GPT4_O))

}

DEFAULT_SYSTEM_MESSAGE = "You are a helpful and concise assistant."
Expand Down

0 comments on commit aeb0ff6

Please sign in to comment.