Skip to content

Forum in maintenance, we will back soon 🙂

Trouble with Build ...
 
Notifications
Clear all

Trouble with Build an API section of course.

5 Posts
2 Users
2 Reactions
612 Views
(@signupnow)
Posts: 3
Active Member
Topic starter
 

Hi, I am having trouble with the activity of getting the google suggest api's to work. I am able to get the flask server running and can see that the requests are being made in Visual Studio Code. As you can see from the screenshots, the connection to the flask server is working because when I type the keyword (like database) it shows up in the terminal as trying to connect. I also try the raw url and replaced the ?q=database and that is working as you can see from the the other screen shot. Note, that I had to switch to 5001 port (in case you are wondering about that) due to the default 5000 port seems to be occupied, as I was getting socket errors.)

Thanks, Jim

API URL without code
API running via terminal

 

 
Posted : 11/18/2023 6:23 pm
(@signupnow)
Posts: 3
Active Member
Topic starter
 

I think the code ChatGPT created was a putting too much other stuff in. I simplified by copying Hasan's version from the video and it worked.

 
Posted : 11/18/2023 9:05 pm
SSAdvisor reacted
SSAdvisor
(@ssadvisor)
Posts: 1139
Noble Member
 

@signupnow I had written about this but cannot find it. I had shown the difference between what Hasan's prompt gave and the same prompt used when I did it. Basically the code you have pictured uses a different means to receive the data. You need to specify the query keyword in your URL.

http://127.0.0.1:5001/get-suggestions?keyword=KEYWORD_TO_SEARCH

Regards,
Earnie Boyd, CEO
Seasoned Solutions Advisor LLC
Schedule 1-on-1 help
Join me on Slack

 
Posted : 11/18/2023 10:55 pm
SSAdvisor
(@ssadvisor)
Posts: 1139
Noble Member
 

Of course I find it after I said I couldn't.

https://learnwithhasan.com/premium-forum/api-projects/course-build-with-ai/

Regards,
Earnie Boyd, CEO
Seasoned Solutions Advisor LLC
Schedule 1-on-1 help
Join me on Slack

 
Posted : 11/18/2023 10:58 pm
(@signupnow)
Posts: 3
Active Member
Topic starter
 

Thanks, Earnie. I appreciate your response and insight. 

 
Posted : 11/19/2023 12:44 am
Share: