DEV Community

Cover image for Integrating With OpenAi(ChatGPT)(With Code example)
Muhammed ALi Abdulwahed
Muhammed ALi Abdulwahed

Posted on

Integrating With OpenAi(ChatGPT)(With Code example)

If your project's requirement puts you in need of integrating it with OpenAi here is a brief depending on OpenAi documentation of how to do that :
First, you need to make your needs clear because OpenAi depends on many models and engines each one of them is an Ai model trained on a specific amount of data and can provide a limited amount of words or types of responses.
Based on the type of response it goes for 2 main categories :
In this type, the usage will be for the completing and text you send and as an example of it :
the number in the end represent the accuracy of the response,davinci 3 is the highest.

Image description
In this type, the usage will be for the Chat and it works 100% the same as you are chatting with Chatgpt, as an example of its models :
gpt-3.5-turbo,gpt-3.5-turbo-0613 ..etc
gpt-3.5-turbo-0613 is the newest one and the one with the highest accuracy,code example:

Image description
Note: please note that as much as you raise your accuracy the response time will be higher.

Top comments (0)