Commit 68d11a60 by Jonathan Thomas

Merge branch 'improved-docs' into 'develop'

Improve AI Options in README.md

See merge request !20
parents 8cc5344a 177e73f2
Pipeline #13224 passed with stages
in 2 minutes 8 seconds
...@@ -14,99 +14,90 @@ ...@@ -14,99 +14,90 @@
[![CreatureChat Trailer Video](src/main/resources/assets/creaturechat/screenshots/video-thumbnail.png)](https://youtu.be/GdY969Orsh0?si=qRgCne10XqOBC8YB) [![CreatureChat Trailer Video](src/main/resources/assets/creaturechat/screenshots/video-thumbnail.png)](https://youtu.be/GdY969Orsh0?si=qRgCne10XqOBC8YB)
### Installation Instructions ## Installation Instructions
<details> ### Fabric (Recommended)
<summary>Fabric (Recommended)</summary>
<h3>Fabric Instructions</h3> 1. **Install Fabric Loader & API:** Follow the instructions [here](https://fabricmc.net/use/).
<ol> 2. **Install CreatureChat Mod:** Download and copy `creaturechat-*.jar` and `fabric-api-*.jar` into your `.minecraft/mods` folder.
<li><strong>Install Fabric Loader & API:</strong> Follow the instructions <a href="https://fabricmc.net/use/">here</a>.</li> 3. **Launch Minecraft** with the Fabric profile.
<li><strong>Install CreatureChat Mod:</strong> Download and copy <code>creaturechat-*.jar</code> and <code>fabric-api-*.jar</code> into your <code>.minecraft/mods</code> folder.</li> 4. **Configure AI:** A LLM (large language model) is required for generating text (AI options **listed below**)
<li><strong>Create an OpenAI API key:</strong> Visit <a href="https://platform.openai.com/api-keys">https://platform.openai.com/api-keys</a>, and use the <strong>+ Create new secret key</strong> button.
Copy/Paste your key into the <code>/creaturechat key set &lt;YOUR-SECRET-KEY-HERE&gt;</code> command.</li> ### Forge (with Sinytra Connector)
<li><strong>Launch Minecraft</strong> with the Fabric profile.</li> *NOTE: Sintra Connector only supports Minecraft 1.20.1.*
</ol>
</details> 1. **Install Forge:** Download [Forge Installer](https://files.minecraftforge.net/), run it, select "Install client".
<details> 2. **Install Forgified Fabric API:** Download [Forgified Fabric API](https://curseforge.com/minecraft/mc-mods/forgified-fabric-api) and copy the `*.jar` into your `.minecraft/mods` folder.
<summary>Forge (with Sinytra Connector)</summary> 3. **Install Sinytra Connector:** Download [Sinytra Connector](https://www.curseforge.com/minecraft/mc-mods/sinytra-connector) and copy the `*.jar` into your `.minecraft/mods` folder.
<h3>Forge Instructions</h3> 4. **Install CreatureChat Mod:** Download and copy `creaturechat-*.jar` into your `.minecraft/mods` folder.
<h4>NOTE: Sintra Connector only supports Minecraft 1.20.1</h4> 6. **Launch Minecraft** with the Forge profile.
<ol> 7. **Configure AI:** A LLM (large language model) is required for generating text (AI options **listed below**)
<li><strong>Install Forge:</strong> Download <a href="https://files.minecraftforge.net/">Forge Installer</a>, run it, select "Install client".</li>
<li><strong>Install Forgified Fabric API:</strong> Download <a href="https://curseforge.com/minecraft/mc-mods/forgified-fabric-api">Forgified Fabric API</a> and copy the <code>*.jar</code> into your <code>.minecraft/mods</code> folder.</li> ## AI Options
<li><strong>Install Sinytra Connector:</strong> Download <a href="https://www.curseforge.com/minecraft/mc-mods/sinytra-connector">Sinytra Connector</a> and copy the <code>*.jar</code> into your <code>.minecraft/mods</code> folder.</li> CreatureChat **requires** an AI / LLM (large language model) to generate text (characters and chat). There are many different
<li><strong>Install CreatureChat Mod:</strong> Download and copy <code>creaturechat-*.jar</code> into your <code>.minecraft/mods</code> folder.</li> options for connecting an LLM.
<li><strong>Create an OpenAI API key:</strong> Visit <a href="https://platform.openai.com/api-keys">https://platform.openai.com/api-keys</a>, and use the <strong>+ Create new secret key</strong> button.
Copy/Paste your key into the <code>/creaturechat key set &lt;YOUR-SECRET-KEY-HERE&gt;</code> command.</li> 1. **Free & Local**: Use open-source and free-to-use LLMs without any API fees. [**Difficulty: Hard**]
<li><strong>Launch Minecraft</strong> with the Forge profile.</li> 2. **Bring Your Own Key**: Use your own API key from providers like OpenAI or Groq. [**Difficulty: Medium**]
</ol> 3. **Token Shop**: Supports CreatureChat by purchasing tokens from the developers on Discord. [**Difficulty: Easy**]
</details>
### 1. Free & Local
### In-game Commands CreatureChat fully supports **free and open-source** LLMs. To get started:
<details>
<summary>Configure CreatureChat</summary> - An HTTP endpoint compatible with the OpenAI Chat Completion JSON syntax is required. We highly recommend using:
<ul> - [Ollama](https://ollama.com/) & [LiteLLM](https://litellm.vercel.app/) as your HTTP proxy.
<li><strong>REQUIRED:</strong> <code>/creaturechat key set &lt;key&gt;</code> - **LiteLLM Features:**
<ul> - Supports over **100+ LLMs** (e.g., Anthropic, VertexAI, HuggingFace, Google Gemini, and Ollama).
<li>Sets the <em>OpenAI API key</em>. This is required for making requests to the LLM.</li> - Proxies them through a local HTTP endpoint compatible with CreatureChat.
</ul> - **Note:** Running a local LLM on your computer requires a powerful GPU.
</li> - Set the local HTTP endpoint in-game:
<li><strong>OPTIONAL:</strong> <code>/creaturechat url set "&lt;url&gt;"</code> - `/creaturechat url set "http://ENTER-YOUR-HTTP-ENDPOINT-FROM-LITE-LLM"`
<ul> - `/creaturechat model set ENTER-MODEL-NAME`
<li>Sets the URL of the API used to make LLM requests. Defaults to <code>"https://api.openai.com/v1/chat/completions"</code></li> - `/creaturechat timeout set 360`
</ul> - Additional help can be found in the **#locall-llm-info** channel on our [Discord](https://discord.gg/m9dvPFmN3e).
</li>
<li><strong>OPTIONAL:</strong> <code>/creaturechat model set &lt;model&gt;</code> ### 2. Bring Your Own Key
<ul> For those already using a third-party API (e.g., OpenAI, Groq):
<li>Sets the model used for generating responses in chats. Defaults to <code>gpt-3.5-turbo</code>.</li>
</ul> - Integrate your own API key for seamless connectivity.
</li> - Costs depend on the provider’s usage-based pricing model.
<li><strong>OPTIONAL:</strong> <code>/creaturechat timeout set &lt;seconds&gt;</code> - By default, CreatureChat uses the OpenAI endpoint and `gpt-3.5-turbo` model, known for its balance of low cost and fast performance.
<ul> - Be aware that OpenAI’s developer API does not include free usage. Please review the [OpenAI pricing](https://openai.com/pricing#language-models) for detailed information.
<li>Sets the timeout (in seconds) for API HTTP requests. Defaults to <code>10</code> seconds.</li> - To create an OpenAI API key, visit [https://platform.openai.com/api-keys](https://platform.openai.com/api-keys), and use the **+ Create new secret key** button.
</ul> - Set the API key & model in-game:
</li> - `/creaturechat key set <YOUR-SECRET-KEY-HERE>`
<li><strong>OPTIONAL:</strong> <code>/creaturechat whitelist &lt;entityType | all | clear&gt;</code> - Show chat bubbles - `/creaturechat model set gpt-3.5-turbo`
<ul>
<li>Shows chat bubbles for the specified entity type or all entities, or clears the whitelist.</li> ### 3. Token Shop
</ul> Supports CreatureChat by purchasing tokens from the developers:
</li>
<li><strong>OPTIONAL:</strong> <code>/creaturechat blacklist &lt;entityType | all | clear&gt;</code> - Hide chat bubbles - Easy setup with simple token packs, created for CreatureChat users.
<ul> - More info is available in the #token-shop channel on our [Discord](https://discord.gg/m9dvPFmN3e).
<li>Hides chat bubbles for the specified entity type or all entities, or clears the blacklist.</li> - Set the token-shop API key in-game:
</ul> - `/creaturechat key set <YOUR-SECRET-KEY-HERE>`
</li>
</ul> ### In-game Commands / Configuration
- **REQUIRED:** `/creaturechat key set <key>`
<h4>Configuration Scope:</h4> - Sets the *OpenAI API key*. This is required for making requests to the LLM.
<ul> - **OPTIONAL:** `/creaturechat url set "<url>"`
<li><strong>OPTIONAL:</strong> You can specify the configuration scope at the end of each command to determine where settings should be applied: - Sets the URL of the API used to make LLM requests. Defaults to `"https://api.openai.com/v1/chat/completions"`.
<ul> - **OPTIONAL:** `/creaturechat model set <model>`
<li><strong>Default</strong> Configuration (<code>--config default</code>): Applies the configuration universally, unless overridden by a server-specific configuration.</li> - Sets the model used for generating responses in chats. Defaults to `gpt-3.5-turbo`.
<li><strong>Server</strong>-Specific Configuration (<code>--config server</code>): Applies the configuration only to the server where the command is executed.</li> - **OPTIONAL:** `/creaturechat timeout set <seconds>`
<li>If the <code>--config</code> option is not specified, the <code>default</code> configuration scope is assumed.</li> - Sets the timeout (in seconds) for API HTTP requests. Defaults to `10` seconds.
</ul> - **OPTIONAL:** `/creaturechat whitelist <entityType | all | clear>` - Show chat bubbles
</li> - Shows chat bubbles for the specified entity type or all entities, or clears the whitelist.
</ul> - **OPTIONAL:** `/creaturechat blacklist <entityType | all | clear>` - Hide chat bubbles
</details> - Hides chat bubbles for the specified entity type or all entities, or clears the blacklist.
- **OPTIONAL:** `/story set "<story-text>"`
### Does OpenAI offer a **FREE** model? - Sets a custom story (included in character creation and chat prompts).
While ChatGPT is a popular product and does offer a free version to their users on their website, - **OPTIONAL:** `/story display | clear`
the OpenAI developer API does not extend any free models or free usage. You will be charged for each token - Display or clear the current story.
consumed and generated. We use the `gpt-3.5-turbo` model by default, due to its low cost
and fast performance... however it is not free. #### Configuration Scope (default | server):
- **OPTIONAL:** Specify the configuration scope at the end of each command to determine where settings should be applied:
### Free Local LLM - **Default Configuration (`--config default`):** Applies the configuration universally, unless overridden by a server-specific configuration.
CreatureChat fully supports **free & open-source** LLMs. An HTTP endpoint which supports the OpenAI Chat Completion - **Server-Specific Configuration (`--config server`):** Applies the configuration only to the server where the command is executed.
JSON syntax is required. We highly recommend using [Ollama](https://ollama.com/) or [LiteLLM](https://litellm.vercel.app/) as your HTTP proxy. - If the `--config` option is not specified, the `default` configuration scope is assumed.
LiteLLM supports **100+ LLMs** (including Anthropic, VertexAI, HuggingFace, Google Gemini, and Ollama), and proxies them through a
local HTTP endpoint in a compatible format with CreatureChat. *NOTE: You must have a very expensive GPU to run a local
LLM on your computer at a speed which is fast enough to be playable in Minecraft.*
### Costs & Security
Using third-party Large Language Model (LLM) APIs, such as OpenAI, will incur usage-based **fees**.
These fees are based on the amount of data processed. Before integrating your API key, please
[review the pricing](https://openai.com/pricing#language-models) details provided by the API provider.
Be aware of the **potential costs** and plan your usage accordingly to avoid unexpected charges.
### Screenshots ### Screenshots
![Interact with Minecraft Creatures](src/main/resources/assets/creaturechat/screenshots/salmon-follow.png) ![Interact with Minecraft Creatures](src/main/resources/assets/creaturechat/screenshots/salmon-follow.png)
...@@ -124,7 +115,7 @@ Be aware of the **potential costs** and plan your usage accordingly to avoid une ...@@ -124,7 +115,7 @@ Be aware of the **potential costs** and plan your usage accordingly to avoid une
- [Join us on Discord](https://discord.gg/m9dvPFmN3e) - [Join us on Discord](https://discord.gg/m9dvPFmN3e)
- [Build Instructions](INSTALL.md) ([Source Code](http://gitlab.openshot.org/minecraft/creature-chat)) - [Build Instructions](INSTALL.md) ([Source Code](http://gitlab.openshot.org/minecraft/creature-chat))
- Download from [Modrinth](https://modrinth.com/project/creaturechat) or [CurseForge](https://www.curseforge.com/minecraft/mc-mods/creaturechat) - Download from [Modrinth](https://modrinth.com/project/creaturechat)
- Follow Us: [YouTube](https://www.youtube.com/@CreatureChat/featured) | - Follow Us: [YouTube](https://www.youtube.com/@CreatureChat/featured) |
[Twitter](https://twitter.com/TheCreatureChat) | [Twitter](https://twitter.com/TheCreatureChat) |
[TikTok](https://www.tiktok.com/@creaturechat) [TikTok](https://www.tiktok.com/@creaturechat)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment