Compare commits

...

2 Commits

Author SHA1 Message Date
Paul Harrison aade152486 Add GPT-4-turbo-preview to enabled models 2024-02-17 16:13:54 +00:00
Paul Harrison 50fa0cc5ae Update GPT-3 pricing 2024-02-17 16:02:29 +00:00
3 changed files with 7 additions and 2 deletions

View File

@ -1,6 +1,6 @@
[tool.poetry] [tool.poetry]
name = "llm-chat" name = "llm-chat"
version = "1.1.0" version = "1.1.2"
description = "A general CLI interface for large language models." description = "A general CLI interface for large language models."
authors = ["Paul Harrison <paul@harrison.sh>"] authors = ["Paul Harrison <paul@harrison.sh>"]
readme = "README.md" readme = "README.md"

View File

@ -82,13 +82,17 @@ class Chat:
_pricing: dict[Model, dict[Token, float]] = { _pricing: dict[Model, dict[Token, float]] = {
Model.GPT3: { Model.GPT3: {
Token.COMPLETION: 0.002, Token.COMPLETION: 0.0005,
Token.PROMPT: 0.0015, Token.PROMPT: 0.0015,
}, },
Model.GPT4: { Model.GPT4: {
Token.COMPLETION: 0.06, Token.COMPLETION: 0.06,
Token.PROMPT: 0.03, Token.PROMPT: 0.03,
}, },
Model.GPT4_TURBO: {
Token.COMPLETION: 0.03,
Token.PROMPT: 0.01,
},
} }
def __init__( def __init__(

View File

@ -10,6 +10,7 @@ class Model(StrEnum):
GPT3 = "gpt-3.5-turbo" GPT3 = "gpt-3.5-turbo"
GPT4 = "gpt-4" GPT4 = "gpt-4"
GPT4_TURBO = "gpt-4-turbo-preview"
DEFAULT_MODEL = Model.GPT3 DEFAULT_MODEL = Model.GPT3