This is a Python script that simulates a war game dialogue between two entities: an AI system named "WOPR" and a human supervisor named "David Lightman". It uses the LangChain implementation of OpenAI's ChatGPT model.
We don't claim any credit except for the idea of adapting the code you can find on LangChain which explains how to play Two-Player Dungeons & Dragons using an LLM like OpenAI's ChatGPT.
To run this script, you need to set your OpenAI API key as an environment variable:
export OPENAI_API_KEY="your OpenAI API Key"