Lesson 1: Environment
1.1 Welcome
1.2 Python
1.3 Virtual environment
1.4 Git
1.5 Cursor
1.6 OpenAI
1.7 First AI Agent
1.8 AI Agent with OpenAI SDK
1.9 AI Agent Chat Bot
1.10 Plan Your Project
1.11 Plan Your Requirements
Lesson 2: User Interaction
2.1 Architecture
2.2 Core Logic as a Service
2.3 Verify core logic
2.4 Web Server
2.5 Command Line Interface
2.6 Web Interface
2.7 Debugging the Web Interface
2.8 Bonus Development Tips
2.9 Your Project
Lesson 3: Interacting with the World
3.1 Interacting with the World
3.2 API for Agents
3.3 Preparing Product Catalog
3.4 Building a Product Search API
3.5 Building a Product Search API 2
3.6 Enabling the Agent to Use Product Search API
3.7 Web Interface
3.8 Structured Output
3.9 Structured Output 2
3.10 Structured Output 3
3.11 Your project
Lesson 1.9: AI Agent Chat Bot
In our previous step, we created an AI agent that can generate text based on a prompt. In this step, we will wrap this agent into a chatbot that can interact with the user on the command line.
Let's use the following prompt to create a chatbot:
Create chatbot_agent.py script, which is a chatbot that can interact with the user on the command line.
The chatbot should greet the user, ask for input, and generate a response based on the input. The chatbot should continue the conversation until the user types "exit".
The chatbot should use the AI agent we created in first_agent.py to handle the conversation.