Creating sql query is not working with openai

The below code is not working on python. I mean to say not returning any output. I have copied this code from Examples

import os
import openai

openai.api_key = “******************************IjKHx”

response = openai.Completion.create(
model=“text-davinci-003”,
prompt=“Create a SQL request to find all users who live in California and have over 1000 credits:”,
temperature=0.7,
max_tokens=60,
top_p=1.0,
frequency_penalty=0.0,
presence_penalty=0.0
)
Can anyone help?

Welcome to the community @guptaaman78678

Have a look at this example

This issue has been covered many times here. Best practice is to search before creating a topic.

I saw your example ,this is the same code copied from the examples.But anyways, issue is fixed. I had to call text with index 0.