Connecting the OpenAI API

Obtain OpenAI API Key

  • Visit the OpenAI platform at this link.

  • Create an account or log in if you already have one.

  • Generate your unique API key. This will be used to authenticate your plugin's requests with OpenAI.

2. Configure the config.yml:

  • Open the config.yml file for the GPT GAMES plugin.

  • Locate the openai section and find the following settings:

prefix: '&8[&6GPTGames&8] &f'
lang: english

# Menu configurations
menus:
  reward-menu-name: '&6Rewards'
  reward-display-menu-name: '&6Reward: &f%reward%'
  roulette-menu-name: '&6Roulette'
  # ... [Other menu items]

# Game configurations
auto-games: true
game-interval: 3

api-key: API_KEY_HERE
debug: false

Replace API_KEY_HERE with the API key you obtained from OpenAI.

Configuration Explanation:

  • api-key: Insert the unique OpenAI API key you acquired.

  • prefix: Defines how the plugin messages will be prefixed in the chat.

  • lang: Specifies the operational language of the plugin. Ensure it aligns with a language file in the β€œlang” directory.

  • menus: This section lets you customize the names and appearances of various menu items.

  • auto-games: Determines if games should start automatically.

  • game-interval: Sets the frequency for game starts, measured in minutes.

  • debug: Advanced users can enable this for debugging, but it's recommended to keep it disabled as it might affect performance due to verbose debug outputs.

By carefully following these steps, you will have successfully fused OpenAI API with the GPTGames plugin, paving the way for an enhanced gaming experience. In case of uncertainties or technical difficulties, always remember the GPTGames Wiki is there for reference, or you can engage the plugin's community for insights.

Last updated