Skip to content

Add Advanced Python Tutor Bot Gradio app, prompt templates, and docs#2

Open
arshad831 wants to merge 1 commit into
mainfrom
codex/create-python-tutor-bot-using-gradio-0h0hq2
Open

Add Advanced Python Tutor Bot Gradio app, prompt templates, and docs#2
arshad831 wants to merge 1 commit into
mainfrom
codex/create-python-tutor-bot-using-gradio-0h0hq2

Conversation

@arshad831
Copy link
Copy Markdown
Contributor

Motivation

  • Provide a beginner-friendly interactive tutor that explains Python concepts, debugs code, runs quizzes, and suggests improvements using an LLM-backed chat UI.
  • Ship a minimal runnable project layout with guidance for local API key configuration and dependency management.

Description

  • Add app.py which builds a Gradio chat interface (build_app) and implements request handling via get_tutor_response, message construction (build_messages), and history conversion (_history_to_messages).
  • Add prompts.py containing reusable PROMPT_TEMPLATES and MODE_DESCRIPTIONS for the four tutor modes: Explain Concept, Debug Code, Quiz Me, and Improve Code.
  • Add project metadata and usage instructions in README.md, include runtime dependencies in requirements.txt, and provide an .env.example plus .gitignore to manage OPENAI_API_KEY and local files.
  • Use python-dotenv to load a local .env, validate the OPENAI_API_KEY, set a SYSTEM_PROMPT, and call the OpenAI client with model gpt-4.1-mini and temperature 0.4.

Testing

  • No automated tests were added or executed for this change.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant