Project

Simple Python CLI Chat

Easy
69 completions
~ 3 hours
4.5

Learn about the basics of OpenAI API and chat completions API, and how to send and receive messages and call functions with GPT.

Provided by

JetBrains Academy JetBrains Academy

About

Get started with OpenAI's Chat Completion API by implementing it in a Python CLI program. Create a CLI assistant with whom you can chat.

Graduate project icon

Graduate project

This project covers the core topics of the AI Programming for Python Developers course, making it sufficiently challenging to be a proud addition to your portfolio.

At least one graduate project is required to complete the course.

What you'll learn

Once you choose a project, we'll provide you with a study plan that includes all the necessary topics from your course to get it built. Here’s what awaits you:
Read input from the console, send it to GPT, and calculate the token cost.
Make the program continue and make the assistant call the function to end the program.

Reviews

Gabriel Porras avatar
Gabriel Porras
3 weeks ago
During this project, I learned how to interact with ChatGPT and LLMs following OpenAI's API standards, including message structure with system/user/assistant roles and function calling. The main challenge was configuring PyCharm on Windows. I initially tried WSL but eventually worked natively with ...
Andrzej Dańków avatar
Andrzej Dańków
4 months ago
I have learnt a lot about openai API and dictionary data type in Python.
Roland Onderka avatar
Roland Onderka
5 months ago
Very useful to learn using tool functions, although some code snippeds seemed to be outdated.

4.5

Learners who completed this project within the AI Programming for Python Developers course rated it as follows:
Usefulness
4.8
Fun
4.6
Clarity
4.2