hello. when i try to use the o1-mini model, i get an error that it doesnt exist. i've updated the openai library so dont see what the issue could be.
this is my code for reference:
import tkinter as tk
from tkinter import scrolledtext
from openai import OpenAI
api_key = 'api-key' #this does contain my actual key
client = OpenAI(api_key=api_key)
def generate_code():
input_text = text_input.get("1.0", "end-1c")
try:
response = client.chat.completions.create(
model="o1-mini",
messages=[
{"role": "system", "content": "You are a coding assistant for making all kinds of Python apps."},
{"role": "user", "content": input_text}
])
code = response.choices[0].text.strip()
text_output.delete("1.0", tk.END)
text_output.insert(tk.END, code)
except Exception as e:
text_output.insert(tk.END, f"Error: {str(e)}")
# tkinter window stuff, not related
this is the error i get:
Error: Error code: 404 - {'error': {'message': 'The model `o1-mini` does not exist or you do not have access to it.', 'type': 'invalid_request_error', 'param': None, 'code': 'model_not_found'}}