I have written an application in langchain that passes a number of chains to a Sequential Chain to run. The problem I'm having is that the prompts are so large that they are exceeding the 4K token limit size. I saw that OpenAI has released a new 16K token window sized model for ChatGPT, but I can't seem to access it from the API. When I try, I get the following error:
openai.error.InvalidRequestError: This is a chat model and not supported in the v1/completions endpoint. Did you mean to use v1/chat/completions?
Here is how I'm attempting to instantiate the model:
self.llm = OpenAI(model='gpt-3.5-turbo-16k',temperature = self.config.llm.temperature,
openai_api_key = self.config.llm.openai_api_key,
max_tokens=self.config.llm.max_tokens
)
Anybody know how I can fix this?