This is a game demo that illustrates how to use JavaScript to call OpenAI's ChatGPT conversation API. The demo includes two scenarios: one for selecting a model, where you can move to the corresponding character and press the spacebar to enter the conversation scene; the other is the conversation scene, which follows different logic paths based on your choices.

There are mainly two types of interactions: one is SSE (Server-Sent Events) streaming conversation, and the other is synchronous conversation.

If you wish to make modifications, it is recommended to replace the API URL with the one from OpenAI, along with the corresponding API key. (Note that considering the accessibility for users in China, a proxy URL and key are used. Non-Chinese users should use their own credentials.)