Adding AI to your Python Project with the ChatGPT API
Course Description
Did you know that you can add the power of AI to your own Python application by utilising the ChatGPT API? This course is designed for Python programmers who want to learn how to add AI features like sentiment analysis and natural language processing to their applications to make them smarter and more interactive. We’ll start with the basics, such as setting up and making simple API requests, and then gradually explore more advanced topics like analysing usernames for inappropriate content, doing sentiment analysis on comments and analysing a log file for suspicious activity. Continuing on we will complete more advanced tasks like specifying how the responses will be formatted using structured data and getting our own information into the model through the use of functions. By the end of the course, participants will have a solid understanding of how to leverage the OpenAI models to create smarter and more interactive Python applications.
2 Days
€695.00
Who should attend
This course assumes familiarity with the Python programming language. No experience with AI is assumed. Access to the OpenAI API is a requirement for this course.Introduction
Introduction to AI ConceptsUnderstanding the limitations of AI
Python development environment
Understanding a RESTful Web Service
Making a call
Understanding the response
JSON and JSON processing functions in Python
Getting Started
Registering for OpenAI APIGetting API key
API Playground
Hello World API Call in playground
Choosing a model
What models are availableMonitoring Usage
Specifying max_tokens
Checking availability
OpenAI Requests In Python
Install OpenAI packageMaking a call
Parts of a call - model, temperature, max_tokens, top_p, frequency_penalty, presence_penalty
API Response
Parsing a response
Some Practical Examples
Vetting usernamesSentiment analysis of comments
Scanning a server log file for suspicious activity
Structured Outputs
JSON modeAdding a response_format
Converting response to a Python dictionary
API Functions
Providing your information to the API using functionsProviding a function description
Understanding the "function" response
Calling the function
Getting a response
Simple example
More on API Functions
Providing more than one functionDescribing multiple functions to assist API in choosing which one to call
More complex example
AIArtificial IntelligencePythonChatGPTChatGPT APIOpenAI APIProgrammingCodingPrompt EngineeringVibe CodingArtificialIntelligencePython 3