Gpt-4-turbo-preview is not available to me

When I try to run using gpt-4-turbo-preview I get an error that the model is not available: ValueError('Unknown model: gpt-4-turbo-preview. Please provide a valid OpenAI model name.Known models are: gpt-4, gpt-4-0314, gpt-4-0613, gpt-4-32k, gpt-4-32k-0314, gpt-4-32k-0613, gpt-4-vision-preview, gpt-4-1106-preview, gpt-4-completion, gpt-4-0314-completion, gpt-4-0613-completion, gpt-4-32k-completion, gpt-4-32k-0314-completion, gpt-4-32k-0613-completion, gpt-4-vision-preview-completion, gpt-4-1106-pr

I previously got a similar error when I tried to use gpt-4-0125-preview directly. I’m accessing the models through LangChain. Does anyone else have this problem and how can it be resolved? Thanks

You’ll have to update this (and other langchain) code. They hardcoded models.

Thanks for the information. That solved my problem. I upgraded langchain to 0.1.6, forcing it to 0.1.6 because pip would not --upgrade and also had to update openai to the latest, then I was able to run gpt-4-turbo-preview.

1 Like