create api for gpt based smart assistant