andrii.mokhovyk@gmail.com�https://www.linkedin.com/in/andriimokhovyk/
AI
integration
Andrii Mokhovyk
November 2023
A.
I have already intergate AI to my projects
What are your expectations?
B.
I’m going to integrate AI and came to listen how
C.
I wonder if I need an AI on my project
Meanwhile AI:
The Future is here
AI integration into your day-to-day tools
→
Microsoft Copilot
→
Google Duet AI for Workspace
AI Integration | November 2023
→
Github Copilot
1. Customize or change settings
You can customize or change any settings with the copilot.
For example- just command "Turn on dark mode"
2. Edit image
Editing an image has never been this simple. With just a simple click, you can:
3. Play music or media
You can ask Copilot to play your favorite music.
4. Summarize any texts/documents
You can summarize anything with just a simple click.
5. Writing assistant
AI powered writing assistant is now seamlessly integrated with your Windows.
1. Coding Assistant
Duet AI is a code assistant that helps you solve problems quickly and easily.
It creates solutions for you on the fly and offers you more debugging support through its AI chat, right from VS Code.
2. Gmail
Draft and refine emails in Gmail with AI.
- Use the "Help me write" feature.
- Add your email description and click "Create".
3. Google Slides
Duet’s AI turns your prompt into a custom image in seconds.
Presentations will never be boring again.
4. Google Sheet
Duet AI can help you to create auto-generated, custom Google Sheet plans for any task, project, or activity that you want to:
GitHub Copilot
Public AI APIs
Must-haves for integration
→
Open AI account with credit balance
→
Understanding which tool you need
→
Server (node/python) or some serverless solution
→
Front-end implementation
AI Integration | November 2023
OpenAI Models
GPT
(generative pre-trained transformer)
DALL·E
Whisper
Embeddings
Moderation
AI Integration | November 2023
The GPT family of models process text using tokens, which are common sequences of characters found in text. The models understand the statistical relationships between these tokens, and excel at producing the next token in a sequence of tokens.
A helpful rule of thumb is that one token generally corresponds to ~4 characters of text for common English text. This translates to roughly ¾ of a word (so 100 tokens ~= 75 words).
Tokens in Language models
AI Integration | November 2023
Compare Language models
GPT 3
based on 175 billion parameters
understand text only
slow response time
up to 16k context
pricing: $0.03 / 1k tokens
GPT 3.5 (ChatGPT)
based on 1.3 billion
parameters
understand text only
fast response time
up to 16k context
pricing: $0.0015 / 1k tokens
GPT 4
based on 100 trillion parameters
understand text and images
slow response time
up to 32k context
pricing: $0.03 / 1k tokens
better multilingual
better efficiency
AI Integration | November 2023
TODO: GPT 4 plus
https://twitter.com/HeyStephenAI/status/1725244630910845375
GPT-4 can solve difficult problems with greater accuracy, GPT-4 surpasses ChatGPT in its advanced reasoning capabilities.
AI Integration | November 2023
GPT-4 can accept images as inputs and generate captions, classifications, and analyses.
AI Integration | November 2023
git clone https://github.com/openai/openai-quickstart-node.git
cd openai-quickstart-node
cp .env.example .env
npm install
npm run dev
https://platform.openai.com/docs/quickstart/build-your-application
AI Integration | November 2023
Prompt and Completion
You input some text as a prompt, and the API will return a text completion that attempts to match whatever instructions or context you gave it.
AI Integration | November 2023
Horse name generator
Imagine you want to create a pet name generator. Coming up with names from scratch is hard!
Not bad! Now, try making your instruction more specific.
Horse name generator
This completion isn't quite what we want. These names are pretty generic, and it seems like the model didn't pick up on the horse part of our instruction.
Horse name generator
In many cases, it’s helpful to both show and tell the model what you want.
Adding examples to your prompt can help communicate patterns or nuances!!!
Nice! Adding examples of the output we’d expect for a given input helped the model provide the types of names we were looking for.
Temperature
Temperature is a parameter that controls the “creativity” or randomness of the text.
A higher temperature (e.g., 0.7) results in more diverse and creative output, while a lower temperature (e.g., 0.2) makes the output more deterministic and focused.
A temperature of 0 would make the model completely deterministic, always choosing the most likely token.
AI Integration | November 2023
function generatePrompt(animal) {
const capitalizedAnimal = animal[0].toUpperCase() + animal.slice(1).toLowerCase();
return `Suggest three names for an animal that is a superhero.
Animal: Cat
Names: Captain Sharpclaw, Agent Fluffball, The Incredible Feline
Animal: Dog
Names: Ruff the Protector, Wonder Canine, Sir Barks-a-Lot
Animal: ${capitalizedAnimal}
Names:`;
}
const completion = await openai.createCompletion({
model: "text-davinci-003",
prompt: generatePrompt(req.body.animal),
temperature: 0.6,
});
https://platform.openai.com/docs/quickstart/build-your-application
AI Integration | November 2023
Courses
→
→
Microsoft - AI For Beginners
https://microsoft.github.io/AI-For-Beginners/
→
Udemy - Master Prompt Engineering
https://www.udemy.com/course/master-prompt-engineering-with-chatgpt/
Microsoft - Generative AI For Beginners
https://github.com/microsoft/generative-ai-for-beginners
Category | Description |
hate | Content that expresses, incites, or promotes hate based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste. |
harassment | Content that expresses, incites, or promotes harassing language towards any target. |
sexual | Content meant to arouse sexual excitement, such as the description of sexual activity, or that promotes sexual services (excluding sex education and wellness). |
self-harm | Content that promotes, encourages, or depicts acts of self-harm, such as suicide, cutting, and eating disorders. |
violence | Content that depicts death, violence, or physical injury. |
Content Moderation
https://platform.openai.com/docs/guides/moderation/
POST https://api.openai.com/v1/moderations
AI Integration | November 2023
Dall·e by Open AI https://platform.openai.com/docs/guides/images | Next leg By Midjourney https://www.thenextleg.io/docs/v2/get-message | Dream by Wombo https://www.w.ai/dream-api |
AI Image Generators
AI Integration | November 2023
DALL·E features
→
Image Generation
DALL·E can create original, realistic images and art from a text description. It can combine concepts, attributes, and styles.
AI Integration | November 2023
DALL·E features
→
Outpainting
DALL·E can expand images beyond what’s in the original canvas, creating expansive new compositions.
AI Integration | November 2023
DALL·E features
→
Inpainting
DALL·E can make realistic edits to existing images from a natural language caption. It can add and remove elements while taking shadows, reflections, and textures into account.
AI Integration | November 2023
DALL·E features
→
Variations
DALL·E can take an image and create different variations of it inspired by the original.
AI Integration | November 2023
DALL·E 3 is now available in beta.
It allows to generate more realistic and accurate images with 4x greater resolution.
AI Integration | November 2023
Image Generation
Pricing
AI Integration | November 2023
More ideas
Topic clustering
Search
Recommendation
Parse Image into color palette
Convert speech into text
AI Integration | November 2023
Wix AI integration
When?
Why?
How?
Deployments a day
Data centers/PoPs Multi Clouds (Google, Amazon)
AI Integration | November 2023
AI Features in Wix
AI Text Generator
October 2022
AI Template
Text Generator
May 2023
Image Generator
June 2023
Create new
Section with AI
July 2023
AI Funnel
September 2023
AI Site Generator
December 2023
AI Integration | November 2023
Monitoring
https://status.openai.com/history
Grafana board
AI Integration | November 2023
Image Creator in Wix Editor
Deployments a day
Data centers/PoPs Multi Clouds (Google, Amazon)
AI Integration | November 2023
Q&A
Any questions?
send your CV to
andrii.mokhovyk@gmail.com
This was a pleasure
https://www.linkedin.com/in/andriimokhovyk/
Thank You!