Add context windows and pricing for 1106 models

This commit is contained in:
Paul Gauthier 2023-11-06 20:18:40 -08:00
parent c8b95b486f
commit 5098be6172

View file

@ -7,6 +7,8 @@ from .model import Model
known_tokens = {
"gpt-3.5-turbo": 4,
"gpt-4": 8,
"gpt-4-1106-preview": 128,
"gpt-3.5-turbo-1106": 16,
}
@ -41,6 +43,9 @@ class OpenAIModel(Model):
elif tokens == 32:
self.prompt_price = 0.06
self.completion_price = 0.12
elif tokens == 128:
self.prompt_price = 0.01
self.completion_price = 0.03
return
@ -48,7 +53,10 @@ class OpenAIModel(Model):
self.edit_format = "whole"
self.always_available = True
if tokens == 4:
if self.name == "gpt-3.5-turbo-1106":
self.prompt_price = 0.001
self.completion_price = 0.002
elif tokens == 4:
self.prompt_price = 0.0015
self.completion_price = 0.002
elif tokens == 16: