Skip to main content

ChatGPT

ChatGPT is a library with utilities to interact with the OpenAI ChatGPT API.

Functions​

constructor​

Constructor to create a ChatGPT instance.

Input:

  • _apiKey (string): The API key to interact with the OpenAI ChatGPT.

complete​

Complete a chat with the OpenAI ChatGPT.

Input:

  • messages (``): The messages to complete the chat.

  • model (string): The model of ChatGPT.

  • temperature (string): The temperature of this request.

Output:

  • message (string): The response from the OpenAI ChatGPT.

complete​

Complete a chat with the OpenAI ChatGPT.

Input:

  • messages (``): The messages to complete the chat.

Output:

  • message (string): The response from the OpenAI ChatGPT.