From 0f6ef048d2de021e1020dc1791a943d4dce1ba1d Mon Sep 17 00:00:00 2001 From: rajib Date: Mon, 26 Jun 2023 02:16:39 -0700 Subject: [PATCH] The openai_info.py does not have gpt-35-turbo which is the underlying Azure Open AI model name (#6321) Since this model name is not there in the list MODEL_COST_PER_1K_TOKENS, when we use get_openai_callback(), for gpt 3.5 model in Azure AI, we do not get the cost of the tokens. This will fix this issue #### Who can review? @hwchase17 @agola11 Co-authored-by: rajib76 Co-authored-by: Dev 2049 --- langchain/callbacks/openai_info.py | 1 + 1 file changed, 1 insertion(+) diff --git a/langchain/callbacks/openai_info.py b/langchain/callbacks/openai_info.py index c66ec7ce873..549720e7c4d 100644 --- a/langchain/callbacks/openai_info.py +++ b/langchain/callbacks/openai_info.py @@ -32,6 +32,7 @@ MODEL_COST_PER_1K_TOKENS = { "gpt-3.5-turbo-16k-completion": 0.004, "gpt-3.5-turbo-16k-0613-completion": 0.004, # Others + "gpt-35-turbo": 0.002, # Azure OpenAI version of ChatGPT "text-ada-001": 0.0004, "ada": 0.0004, "text-babbage-001": 0.0005,