The AI wave is here... ChatGPT Image generation and code completion beta

The AI wave is here... ChatGPT Image generation and code completion beta

ChatGPT has released Image generation, code completion beta testing with pro users. I can already visualize these new features making lives easier for all of us on a daily basis with infinite applications in every industry.

From helping enterprise software engineers to write/clean/help identify bugs to helping Managers/non-tech professionals to generate custom code this will be a great milestone in the evolution of Tech in the 21st century.

Learning to integrate with Ai will be the biggest skill in a few years, how to efficiently use them to solve a business problem can help anyone progress in their career swiftly.

Here's the Sample python code for connecting and Image generating:

Connecting to Env

pip?install?openai -- install the package

import?os

import?openai

openai.organization?=?"org-FvKWejOdBZWCm4FC6gX8Yrvj"

openai.api_key?=?auth --(auth is your private key, you can find it in user settings)

------------------------------------------------------------------------------------------------------------

IMAGE GENERATION

import?requests


headers?=?{

????'Content-Type':?'application/json',

????'Authorization':?'Bearer?your personal auth here'

}


data?=?{

????"prompt":?"description of image you want to generate",

????"n":?'count of images you want to generate (int)',

????"size":?"1024x1024"

}

response?=?requests.post('https://api.openai.com/v1/images/generations',?headers=headers,?json=data)


print(response.json())

------------------------------------------------------------------------------------------------------------


Documentation:

要查看或添加评论,请登录

社区洞察

其他会员也浏览了