Skip to content

Custom Node developed to facilitate the use of the ChatGPT API for chat completion within Dynamo

License

Notifications You must be signed in to change notification settings

aecoder-br/dynamo-chatgpt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dynamo ChatGPT

Custom Node developed to facilitate the use of the ChatGPT API for chat completion within Dynamo

Development

Prerequisites

Setup & Run

  • Search for DynamoChatGPT in the Dynamo package search and install the package as shown in the image below

  • Setup the inputs:
    • prompt (required): The prompt (message) you want to send to ChatGPT

    • api_key (required): Your OpenAI API Key

    • organization_id (optional): Your Organization ID

    • project_id (optional): Your Project ID, under Project > General

    • model (required): ID of the model to use. Learn more here!

      If you have ChatGPT Plus, we recommend using the gpt-4o model or newer, otherwise, use gpt-3.5-turbo or the latest free version

    • temperature (optional): OpenAI description:

      What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both.

    • max_tokens (optional): OpenAI description:

      The maximum number of tokens that can be generated in the chat completion. The total length of input tokens and generated tokens is limited by the model's context length.

      Learn more here!

    • top_p (optional): OpenAI description:

      An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both.

    • frequency_penalty (optional): OpenAI description:

      Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.

      Learn more here!

    • presence_penalty (optional): OpenAI description:

      Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.

      Learn more here!

    • clear_history (optional): Set true, if you want to clear the chat history before sending the request, otherwise set false

      This script stores the conversation history in %appdata%\AECOder\dynamochatgpt\history.json

License

This sample is licensed under the terms of the MIT License. Please see the LICENSE file for more details.