1 of 55

andrii.mokhovyk@gmail.com�https://www.linkedin.com/in/andriimokhovyk/

AI

integration

Andrii Mokhovyk

November 2023

2 of 55

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

3 of 55

4 of 55

Meanwhile AI:

5 of 55

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

6 of 55

7 of 55

1. Customize or change settings

You can customize or change any settings with the copilot.

For example- just command "Turn on dark mode"

8 of 55

2. Edit image

Editing an image has never been this simple. With just a simple click, you can:

  • Remove background
  • Adjust brightness
  • Upscale
  • Resize

9 of 55

3. Play music or media

You can ask Copilot to play your favorite music.

10 of 55

4. Summarize any texts/documents

You can summarize anything with just a simple click.

11 of 55

5. Writing assistant

AI powered writing assistant is now seamlessly integrated with your Windows.

12 of 55

13 of 55

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.

14 of 55

2. Gmail

Draft and refine emails in Gmail with AI.

- Use the "Help me write" feature.

- Add your email description and click "Create".

15 of 55

3. Google Slides

Duet’s AI turns your prompt into a custom image in seconds.

Presentations will never be boring again.

16 of 55

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:

  • Organize
  • Manage
  • Track

17 of 55

18 of 55

GitHub Copilot

19 of 55

20 of 55

Public AI APIs

21 of 55

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

22 of 55

OpenAI Models

GPT

(generative pre-trained transformer)

DALL·E

Whisper

Embeddings

Moderation

AI Integration | November 2023

23 of 55

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

24 of 55

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

25 of 55

TODO: GPT 4 plus

https://twitter.com/HeyStephenAI/status/1725244630910845375

26 of 55

27 of 55

GPT-4 can solve difficult problems with greater accuracy, GPT-4 surpasses ChatGPT in its advanced reasoning capabilities.

AI Integration | November 2023

28 of 55

GPT-4 can accept images as inputs and generate captions, classifications, and analyses.

AI Integration | November 2023

29 of 55

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

30 of 55

31 of 55

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

32 of 55

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.

33 of 55

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.

34 of 55

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.

35 of 55

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

36 of 55

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

37 of 55

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

38 of 55

39 of 55

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

40 of 55

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

41 of 55

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

42 of 55

DALL·E features

Outpainting

DALL·E can expand images beyond what’s in the original canvas, creating expansive new compositions.

AI Integration | November 2023

43 of 55

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

44 of 55

DALL·E features

Variations

DALL·E can take an image and create different variations of it inspired by the original.

AI Integration | November 2023

45 of 55

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

46 of 55

Image Generation

Pricing

AI Integration | November 2023

47 of 55

More ideas

Topic clustering

Search

Recommendation

Parse Image into color palette

Convert speech into text

AI Integration | November 2023

48 of 55

Wix AI integration

When?

Why?

How?

Deployments a day

Data centers/PoPs Multi Clouds (Google, Amazon)

AI Integration | November 2023

49 of 55

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

50 of 55

Monitoring

https://status.openai.com/history

Grafana board

AI Integration | November 2023

51 of 55

Image Creator in Wix Editor

Deployments a day

Data centers/PoPs Multi Clouds (Google, Amazon)

AI Integration | November 2023

52 of 55

Q&A

Any questions?

53 of 55

send your CV to

andrii.mokhovyk@gmail.com

54 of 55

This was a pleasure

https://www.linkedin.com/in/andriimokhovyk/

55 of 55

Thank You!