Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alexandernistor04/warmongergpt
a Langchain sample project written in PyCharm using the OpenAI API which generates Civilization VI advice that always advocates for warlike behavior from the player
https://github.com/alexandernistor04/warmongergpt
chatgpt civilization-vi langchain openai pycharm python
Last synced: 4 days ago
JSON representation
a Langchain sample project written in PyCharm using the OpenAI API which generates Civilization VI advice that always advocates for warlike behavior from the player
- Host: GitHub
- URL: https://github.com/alexandernistor04/warmongergpt
- Owner: AlexanderNistor04
- License: mit
- Created: 2024-01-22T04:34:32.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-01-22T05:06:42.000Z (11 months ago)
- Last Synced: 2024-10-31T17:44:39.512Z (about 2 months ago)
- Topics: chatgpt, civilization-vi, langchain, openai, pycharm, python
- Language: Python
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
For this project, an OpenAI API key is needed. The user can generate a key on OpenAI's website here https://platform.openai.com/docs/overview
Go to API -> API keys -> create new secret key. This will generate a unique API key starting with "sk-". It is very important that this key is kept secret to prevent outside users from using GPT generation tokens without your permission.
To use the key in the project, open keys.py and enter the key into the openai_key variable.This project requires the user to have installed langchain and specifically the langchain-openai package. It's easiest to do this using pip.
To install pip, follow the instructions in this link https://pip.pypa.io/en/stable/installation/
Once pip is installed, navigate to the project directory in terminal and install langchain-open with the line:
$ pip install langchain-openai
After installing langchain, the project should be ready to run. Running the main file will prompt the user to ask warmongerGPT a question, which will use the OpenAI API to generate a response.