From 926457c9d6f79abd3acd01dfaa20c6f862aba0c9 Mon Sep 17 00:00:00 2001 From: holonic Date: Tue, 7 Nov 2023 09:57:54 +0100 Subject: [PATCH 1/3] Added Nov 6th pricing changes for cheaper 3.5 and 4 models --- libs/langchain/langchain/callbacks/openai_info.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libs/langchain/langchain/callbacks/openai_info.py b/libs/langchain/langchain/callbacks/openai_info.py index d4744d1f6afe0..f5ecd433cbf93 100644 --- a/libs/langchain/langchain/callbacks/openai_info.py +++ b/libs/langchain/langchain/callbacks/openai_info.py @@ -6,6 +6,7 @@ MODEL_COST_PER_1K_TOKENS = { # GPT-4 input + "gpt-4-1106-preview": 0.01, "gpt-4": 0.03, "gpt-4-0314": 0.03, "gpt-4-0613": 0.03, @@ -13,6 +14,7 @@ "gpt-4-32k-0314": 0.06, "gpt-4-32k-0613": 0.06, # GPT-4 output + "gpt-4-1106-preview": 0.03, "gpt-4-completion": 0.06, "gpt-4-0314-completion": 0.06, "gpt-4-0613-completion": 0.06, @@ -20,6 +22,7 @@ "gpt-4-32k-0314-completion": 0.12, "gpt-4-32k-0613-completion": 0.12, # GPT-3.5 input + "gpt-3.5-turbo-1106": 0.001, "gpt-3.5-turbo": 0.0015, "gpt-3.5-turbo-0301": 0.0015, "gpt-3.5-turbo-0613": 0.0015, @@ -27,6 +30,7 @@ "gpt-3.5-turbo-16k": 0.003, "gpt-3.5-turbo-16k-0613": 0.003, # GPT-3.5 output + "gpt-3.5-turbo-1106": 0.002, "gpt-3.5-turbo-completion": 0.002, "gpt-3.5-turbo-0301-completion": 0.002, "gpt-3.5-turbo-0613-completion": 0.002, From bd849655630ec586f7b88e9ae5c54737adb0310a Mon Sep 17 00:00:00 2001 From: Harrison Chase Date: Tue, 5 Dec 2023 20:04:28 -0800 Subject: [PATCH 2/3] Update libs/langchain/langchain/callbacks/openai_info.py --- libs/langchain/langchain/callbacks/openai_info.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/langchain/langchain/callbacks/openai_info.py b/libs/langchain/langchain/callbacks/openai_info.py index f5ecd433cbf93..040c49e1eefce 100644 --- a/libs/langchain/langchain/callbacks/openai_info.py +++ b/libs/langchain/langchain/callbacks/openai_info.py @@ -14,7 +14,7 @@ "gpt-4-32k-0314": 0.06, "gpt-4-32k-0613": 0.06, # GPT-4 output - "gpt-4-1106-preview": 0.03, + "gpt-4-1106-preview-completion": 0.03, "gpt-4-completion": 0.06, "gpt-4-0314-completion": 0.06, "gpt-4-0613-completion": 0.06, From 4857f783b0df684000742774514d41e83d9d9383 Mon Sep 17 00:00:00 2001 From: Harrison Chase Date: Tue, 5 Dec 2023 20:05:06 -0800 Subject: [PATCH 3/3] Update libs/langchain/langchain/callbacks/openai_info.py --- libs/langchain/langchain/callbacks/openai_info.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/langchain/langchain/callbacks/openai_info.py b/libs/langchain/langchain/callbacks/openai_info.py index 040c49e1eefce..ba5c90183f727 100644 --- a/libs/langchain/langchain/callbacks/openai_info.py +++ b/libs/langchain/langchain/callbacks/openai_info.py @@ -30,7 +30,7 @@ "gpt-3.5-turbo-16k": 0.003, "gpt-3.5-turbo-16k-0613": 0.003, # GPT-3.5 output - "gpt-3.5-turbo-1106": 0.002, + "gpt-3.5-turbo-1106-completion": 0.002, "gpt-3.5-turbo-completion": 0.002, "gpt-3.5-turbo-0301-completion": 0.002, "gpt-3.5-turbo-0613-completion": 0.002,