diff --git a/haystack/utils/openai_utils.py b/haystack/utils/openai_utils.py index 40d3afbc7..fdde7306c 100644 --- a/haystack/utils/openai_utils.py +++ b/haystack/utils/openai_utils.py @@ -77,7 +77,7 @@ def _openai_text_completion_tokenization_details(model_name: str): if "text-davinci" in model_name: max_tokens_limit = 4097 tokenizer_name = model_tokenizer - elif model_name.startswith("gpt-3.5-turbo-16k"): + elif model_name.startswith("gpt-3.5-turbo-16k") or model_name.startswith("gpt-35-turbo-16k"): max_tokens_limit = 16384 tokenizer_name = model_tokenizer elif model_name.startswith("gpt-3"): diff --git a/releasenotes/notes/support-azure-3.5-gpt-16k-model-ece0cfe03260748c.yaml b/releasenotes/notes/support-azure-3.5-gpt-16k-model-ece0cfe03260748c.yaml new file mode 100644 index 000000000..642831b75 --- /dev/null +++ b/releasenotes/notes/support-azure-3.5-gpt-16k-model-ece0cfe03260748c.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - | + gpt-35-turbo-16k model from Azure can integrate correctly +