Next Step acheived - A response specifically from CHATGPT

 I asked "Perplexity" - how do I correct the following html - when getting the error - "request not defined" --{% extends "layout.html" %}

It provided an answer. I had to reduce the Question "DEF" which includes CHATGPT code. The "request not defined" was not coming from CHATGPT. It was a flask/python/html error condition.

In QUESTION.HTML - there was a line - "<!-- {{ form.csrf_token }} -->" which I commented out.

In FLASK_APP.py code that PERPLEXITY provided - a class was added to prompt for a question.

class QuestionForm(FlaskForm): QuestAI = TextAreaField('Enter your question:')

This was commented out along with references to "FORM"

I set the question variable that is to be passed to CHATGPT - as hardcoded. see below:


As of 1:19pm on 8/5/2024 - CHATGPT responded - with an error - one that I think I can fix --

"You tried to access openai.Completion, but this is no longer supported in openai>=1.0.0 - see the README at https://github.com/openai/openai-python for the API. You can run `openai migrate` to automatically upgrade your codebase to use the 1.0.0 interface. Alternatively, you can pin your installation to the old version, e.g. `pip install openai==0.28` A detailed migration guide is available here: https://github.com/openai/openai-python/discussions/742"


So I need to revise the FLASK_APP.py code to be acceptable to OPENAI.







Comments

Popular posts from this blog

Can I have AI create me a website to be used by voters?

Reset or level set the routine

Coding paused due and restored