I am working on a project that requires me to compare responses from different version of GPT. My code is working properly for model ‘gpt-3.5-turbo-instruct’, but same code is giving me error when I am trying to use advance model like ‘gpt-4-turbo’, ‘gpt-4’ or ‘gpt-4o’.
I am using below code for my work:
client = OpenAI()
-
client.api_key = ‘xxxxxxxxx’*
-
response = client.completions.create(*
-
model=in_model,*
-
prompt=in_prompt,*
-
max_tokens=1500*
-
)*
-
code = response.choices[0].text.strip()*
Guidance in this case is appreciated.