From de5e96b5f95531d8a8f5d5e582b07ab774909647 Mon Sep 17 00:00:00 2001 From: Alex <77668803+Sssanek@users.noreply.github.com> Date: Fri, 9 Feb 2024 01:43:44 +0300 Subject: [PATCH] community[patch]: updated openai prices in mapping (#17009) - **Description:** there are january prices update for chatgpt [blog](https://openai.com/blog/new-embedding-models-and-api-updates), also there are updates on their website on page [pricing](https://openai.com/pricing) - **Issue:** N/A --------- Co-authored-by: Bagatur --- libs/community/langchain_community/callbacks/openai_info.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libs/community/langchain_community/callbacks/openai_info.py b/libs/community/langchain_community/callbacks/openai_info.py index d18059c119..c6f8262285 100644 --- a/libs/community/langchain_community/callbacks/openai_info.py +++ b/libs/community/langchain_community/callbacks/openai_info.py @@ -25,7 +25,10 @@ MODEL_COST_PER_1K_TOKENS = { "gpt-4-vision-preview-completion": 0.03, "gpt-4-1106-preview-completion": 0.03, # GPT-3.5 input + # gpt-3.5-turbo points at gpt-3.5-turbo-0613 until Feb 16, 2024. + # Switches to gpt-3.5-turbo-0125 after. "gpt-3.5-turbo": 0.0015, + "gpt-3.5-turbo-0125": 0.0005, "gpt-3.5-turbo-0301": 0.0015, "gpt-3.5-turbo-0613": 0.0015, "gpt-3.5-turbo-1106": 0.001, @@ -33,7 +36,10 @@ MODEL_COST_PER_1K_TOKENS = { "gpt-3.5-turbo-16k": 0.003, "gpt-3.5-turbo-16k-0613": 0.003, # GPT-3.5 output + # gpt-3.5-turbo points at gpt-3.5-turbo-0613 until Feb 16, 2024. + # Switches to gpt-3.5-turbo-0125 after. "gpt-3.5-turbo-completion": 0.002, + "gpt-3.5-turbo-0125-completion": 0.0015, "gpt-3.5-turbo-0301-completion": 0.002, "gpt-3.5-turbo-0613-completion": 0.002, "gpt-3.5-turbo-1106-completion": 0.002,