Adding AI to your JavaScript Web Application with the ChatGPT API
Course Description
Did you know that you can add the power of AI to your own JavaScript application by utilising the ChatGPT API? This course is designed for JavaScript Developers 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 do 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 JavaScript applications.
2 Days
€695.00
Who should attend
This course is for Web Application Developers and will use JavaScript RESTful API calls to interact with the OpenAI API. The course can be customised for various technology stacks including Angular, React, Node.js and ASP.NET. 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
Web Application development environment
Understanding a RESTful Web Service
Making a call
Understanding the JSON response
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 JavaScript
Install OpenAI dependenciesMaking 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
Utilising responses
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 IntelligenceJavaScriptChatGPTChatGPT APIOpenAI APIProgrammingCodingPrompt EngineeringVibe CodingArtificialIntelligence