Skip to content

Commit

Permalink
gpt-4o added
Browse files Browse the repository at this point in the history
  • Loading branch information
vprelovac committed May 13, 2024
1 parent 5b8fc25 commit 53a923f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,8 @@ models.benchmark(evaluator=gpt4)
| OpenAIProvider('gpt-4') | Total Tokens: 2860 | Total Cost: 0.21837 | Median Latency: 3.22 | Aggregated speed: 10.52 | Accuracy: 44.87% |
| AnthropicProvider('claude-instant-v1') | Total Tokens: 3437 | Total Cost: 0.02153 | Median Latency: 1.84 | Aggregated speed: 61.64 | Accuracy: 42.31% |
| AnthropicProvider('claude-2') | Total Tokens: 3545 | Total Cost: 0.13337 | Median Latency: 6.83 | Aggregated speed: 19.51 | Accuracy: 69.23% |
| OpenAIProvider('gpt-4-turbo') | Total Tokens: 5538 | Total Cost: 0.18256 | Median Latency: 10.68 | Aggregated speed: 14.45 | Accuracy: 74.07% |
| OpenAIProvider('gpt-4o') | Total Tokens: 6483 | Total Cost: 0.10539 | Median Latency: 1.91 | Aggregated speed: 94.01 | Accuracy: 85.19% |
+-------------------------------+--------------------+---------------------+----------------------+-------------------------+------------------+
```
Expand Down
2 changes: 2 additions & 0 deletions llms/providers/openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ class OpenAIProvider(BaseProvider):
"gpt-4": {"prompt": 30.0, "completion": 60.0, "token_limit": 8192, "is_chat": True},
"gpt-4-1106-preview": {"prompt": 10.0, "completion": 30.0, "token_limit": 128000, "is_chat": True, "output_limit": 4_096},
"gpt-4-turbo-preview": {"prompt": 10.0, "completion": 30.0, "token_limit": 128000, "is_chat": True, "output_limit": 4_096},
"gpt-4-turbo": {"prompt": 10.0, "completion": 30.0, "token_limit": 128000, "is_chat": True, "output_limit": 4_096},
"gpt-4o": {"prompt": 5.0, "completion": 15.0, "token_limit": 128000, "is_chat": True, "output_limit": 4_096},
}

def __init__(
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

setup(
name="pyllms",
version="0.4.3",
description="Minimal Python library to connect to LLMs (OpenAI, Anthropic, Google Palm2/Vertex, AI21, Cohere, Aleph-Alpha, HuggingfaceHub), with a built-in model performance benchmark.",
version="0.5.0",
description="Minimal Python library to connect to LLMs (OpenAI, Anthropic, Google Palm2/Vertex, Mistral, Ollama, AI21, Cohere, Aleph-Alpha, HuggingfaceHub), with a built-in model performance benchmark.",
long_description=long_description,
long_description_content_type="text/markdown",
author="Vladimir Prelovac",
Expand Down

0 comments on commit 53a923f

Please sign in to comment.