From cdc609d4800416946302e4c6d8c1de33186da1ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cem=20Avc=C4=B1?= <101732768+cem256@users.noreply.github.com> Date: Thu, 27 Jun 2024 19:23:57 +0300 Subject: [PATCH] Add support to GPT-4o #229 (#230) --- slang_gpt/README.md | 4 +++- slang_gpt/lib/model/gpt_model.dart | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/slang_gpt/README.md b/slang_gpt/README.md index e7fb0d3e..6c1f46a2 100644 --- a/slang_gpt/README.md +++ b/slang_gpt/README.md @@ -74,8 +74,10 @@ dart run slang_gpt --target=fr --api-key= | Model name | Provider | Context length | Cost per 1k input token | Cost per input word (English) | |---------------------|----------|----------------|-------------------------|-------------------------------| | `gpt-3.5-turbo` | Open AI | 4096 | $0.0015 | $0.000001125 | -| `gpt-3.5-turbo-16k` | Open AI | 16384 | $0.003 | $0.00000225 | +| `gpt-3.5-turbo-16k` | Open AI | 16384 | $0.003 | $0.00000225 | | `gpt-4` | Open AI | 8192 | $0.03 | $0.0000225 | +| `gpt-4-turbo` | Open AI | 64000 | $0.01 | $0.00001 | +| `gpt-4o` | Open AI | 128000 | $0.005 | $0.000005 | ## GPT context length diff --git a/slang_gpt/lib/model/gpt_model.dart b/slang_gpt/lib/model/gpt_model.dart index c4f0e649..f2b08f80 100644 --- a/slang_gpt/lib/model/gpt_model.dart +++ b/slang_gpt/lib/model/gpt_model.dart @@ -20,6 +20,10 @@ enum GptModel { defaultInputLength: 64000, costPerInputToken: 0.00001, costPerOutputToken: 0.00002), + gpt4o('gpt-4o', GptProvider.openai, + defaultInputLength: 128000, + costPerInputToken: 0.000005, + costPerOutputToken: 0.000015), ; const GptModel(