From ba9371854f61a2d538fcb01270fe3dfdb2bba248 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Attila=20T=C5=91k=C3=A9s?= <62890262+attila-tokes@users.noreply.github.com> Date: Fri, 29 Sep 2023 18:44:55 +0300 Subject: [PATCH] OpenAI gpt-3.5-turbo-instruct cost information (#11218) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added pricing info for `gpt-3.5-turbo-instruct` for OpenAI and Azure OpenAI. Co-authored-by: Attila Tőkés --- 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 2952e99a93b..cfd59f8fc84 100644 --- a/libs/langchain/langchain/callbacks/openai_info.py +++ b/libs/langchain/langchain/callbacks/openai_info.py @@ -23,24 +23,28 @@ MODEL_COST_PER_1K_TOKENS = { "gpt-3.5-turbo": 0.0015, "gpt-3.5-turbo-0301": 0.0015, "gpt-3.5-turbo-0613": 0.0015, + "gpt-3.5-turbo-instruct": 0.0015, "gpt-3.5-turbo-16k": 0.003, "gpt-3.5-turbo-16k-0613": 0.003, # GPT-3.5 output "gpt-3.5-turbo-completion": 0.002, "gpt-3.5-turbo-0301-completion": 0.002, "gpt-3.5-turbo-0613-completion": 0.002, + "gpt-3.5-turbo-instruct-completion": 0.002, "gpt-3.5-turbo-16k-completion": 0.004, "gpt-3.5-turbo-16k-0613-completion": 0.004, # Azure GPT-35 input "gpt-35-turbo": 0.0015, # Azure OpenAI version of ChatGPT "gpt-35-turbo-0301": 0.0015, # Azure OpenAI version of ChatGPT "gpt-35-turbo-0613": 0.0015, + "gpt-35-turbo-instruct": 0.0015, "gpt-35-turbo-16k": 0.003, "gpt-35-turbo-16k-0613": 0.003, # Azure GPT-35 output "gpt-35-turbo-completion": 0.002, # Azure OpenAI version of ChatGPT "gpt-35-turbo-0301-completion": 0.002, # Azure OpenAI version of ChatGPT "gpt-35-turbo-0613-completion": 0.002, + "gpt-35-turbo-instruct-completion": 0.002, "gpt-35-turbo-16k-completion": 0.004, "gpt-35-turbo-16k-0613-completion": 0.004, # Others