Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

AI

Chatbot seems limited.

I coded the chatbot as per your instructions, added it to my website as a page and it works fine but it can't give answers to requests as per the chat.openai.com. Why is this? How do I fix this?

Dustin U
seal-mask
.a{fill-rule:evenodd;}techdegree
Dustin U
Treehouse Teacher

Hi Greggar,

We have a few different chatbot videos on the site! Which video are you referring this to?

5 Answers

Dustin U
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Dustin U
Treehouse Teacher

Hey Greggar! Sorry for the radio silence. I saw you joined the Discord server and attempted to reach out there but haven't heard back. :(

I'll assist you here, though! I see you're referring to the Build a Basic ChatGPT Clone with Vanilla JavaScript video. You mentioned that it works fine but it can't give answers to requests as per the chat.openai,com. I am a bit confused. You saying it "works fine" does that mean it works with no errors in the console? Or are you getting console errors. Please refer back to the video's teacher's notes to see a common error 429 that comes from being rate limited with the API.

Hi Dustin,

I followed your tutorial and added the chatbot to a page on a portfolio website I built as part of a web dev course I am on.

Like I said it works fine and I get no errors as per it answering etc. Except I noticed that questions asked in the original Chatgpt where I would get answers would not give answers in my chatbot. EG: Q to chatgpt: Can I have the html, css and javscript code for an e-commerce website with payments options? chatgpt provides the html and css codes.

Same question in the chatbot will provide the following answer: "I am an AI language model and unfortunately, I cannot provide you with the code for an entire e-commerce website with payment options. Building an e-commerce website is a complex process that requires planning, research, design, coding skills, and databases for securely handling customer and payment data. etc etc."

Dustin U
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Dustin U
Treehouse Teacher

Hey Greggar!

Seems like the ChatGPT clone is working just fine. AI tools like chatGPT cannot provide you with the entire code for something complex such as an e-commerce platform. These are very complex and difficult to build. ChatGPT can't just give you the code and you copy and paste it in and it works. Instead, you should have the knowledge about what you want to build and use ChatGPT to help you build it step by step, piece by piece. Moreover, some complex builds such as an e-commerce platform that can handle payment options also rely on third-party tools like databases. ChatGPT cannot sign you up for these things. Thats why a solid understanding of what you'd like ChatGPT to help you build is crucial here. I hope this helps!

Dustin,

I understand fully that one must have a knowledge of the various coding languages etc to build a complex platform. But my question still is; why doesn't the chatgpt clone work just as the original Chatgpt?

If the original chatgpt can give me code snipets why can't the clone do the same if asked the same question?

Is there anything that needs to be added to upgrade the chatgpt clone to its full potential? Did I miss something from your tutorial?

Dustin U
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Dustin U
Treehouse Teacher

Hey Greggar! 👋🏼

I see what you mean now. I prompted my clone as well as my Discord ChatGPT Bot with the same prompt as you and both attempts I get "I am an AI language model and unfortunately, I cannot provide you with the code for an entire e-commerce website with payment options. ..."

The model I am using in this video is gpt-3.5-turbo. This is also the model I am using on chat.openai. Ive tried changing models and using different parameters in the request (such as adjusting temperature and max_tokens) but to no avail.

If I am being completely honest, I'm not really too sure why this is happening. One reason could be that OpenAI limits code competition requests to prevent malware and malicious code from being generated since the request is due to e-commerce and that typically is related to real people with real currency transactions. This could be a safety net put in place. The reason you can get the code completions on chat.openai is because its from their platform.

Here is something on StackOverflow that might offer some insight!

Dustin,

Yes I too tried changing the model version and max_tokens but that did nothing. BTW you didnt provide the link to the stackoverflow info. :)

Thanks,