mirror of
https://github.com/kolbytn/mindcraft.git
synced 2025-08-06 07:15:45 +02:00
clean up, added replicate
This commit is contained in:
parent
0bd92f7521
commit
017aaa2779
1 changed files with 28 additions and 22 deletions
50
README.md
50
README.md
|
@ -8,16 +8,21 @@ This project allows an AI model to write/execute code on your computer that may
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
- [OpenAI API Subscription](https://openai.com/blog/openai-api), [Gemini API Subscription](https://aistudio.google.com/app/apikey), [Anthropic API Subscription](https://docs.anthropic.com/claude/docs/getting-access-to-claude), or [Ollama Installed](https://ollama.com/download)
|
- [OpenAI API Subscription](https://openai.com/blog/openai-api), [Gemini API Subscription](https://aistudio.google.com/app/apikey), [Anthropic API Subscription](https://docs.anthropic.com/claude/docs/getting-access-to-claude), [Replicate API Subscription](https://replicate.com/) or [Ollama Installed](https://ollama.com/download)
|
||||||
- [Minecraft Java Edition](https://www.minecraft.net/en-us/store/minecraft-java-bedrock-edition-pc)
|
- [Minecraft Java Edition](https://www.minecraft.net/en-us/store/minecraft-java-bedrock-edition-pc)
|
||||||
- [Node.js](https://nodejs.org/) (at least v14)
|
- [Node.js](https://nodejs.org/) (at least v14)
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
Add one of these environment variables:
|
Add the environment variable for the model you want to use:
|
||||||
- `OPENAI_API_KEY` (and optionally `OPENAI_ORG_ID`)
|
|
||||||
- `GEMINI_API_KEY`
|
| API | Env Variable | Example Model name | Docs |
|
||||||
- `ANTHROPIC_API_KEY` (and optionally `OPENAI_API_KEY` for embeddings. not necessary, but without embeddings performance will suffer)
|
|------|------|------|------|
|
||||||
|
| OpenAI | `OPENAI_API_KEY` | `gpt-3.5-turbo` | [docs](https://platform.openai.com/docs/models) | (optionally add `OPENAI_ORG_ID`)
|
||||||
|
| Google | `GEMINI_API_KEY` | `gemini-pro` | [docs](https://ai.google.dev/gemini-api/docs/models/gemini) |
|
||||||
|
| Anthropic | `ANTHROPIC_API_KEY` | `claude-3-haiku-20240307` | [docs](https://docs.anthropic.com/claude/docs/models-overview) |
|
||||||
|
| Replicate | `REPLICATE_API_KEY` | `meta/meta-llama-3-70b-instruct` | [docs](https://replicate.com/collections/language-models) |
|
||||||
|
| Ollama (local) | n/a | `llama3` | [docs](https://ollama.com/library) |
|
||||||
|
|
||||||
⭐[How do I add the API key as an environment variable?](https://phoenixnap.com/kb/windows-set-environment-variable)⭐
|
⭐[How do I add the API key as an environment variable?](https://phoenixnap.com/kb/windows-set-environment-variable)⭐
|
||||||
|
|
||||||
|
@ -30,7 +35,7 @@ Run `npm install`
|
||||||
|
|
||||||
Install the minecraft version specified in `settings.json`, currently supports up to 1.20.4
|
Install the minecraft version specified in `settings.json`, currently supports up to 1.20.4
|
||||||
|
|
||||||
## Running Locally
|
### Running Locally
|
||||||
|
|
||||||
Start a minecraft world and open it to LAN on localhost port `55916`
|
Start a minecraft world and open it to LAN on localhost port `55916`
|
||||||
|
|
||||||
|
@ -40,13 +45,27 @@ You can configure the agent's name, model, and prompts in their profile like `an
|
||||||
|
|
||||||
You can configure project details in `settings.json`.
|
You can configure project details in `settings.json`.
|
||||||
|
|
||||||
## Bot Profiles
|
### Online Servers
|
||||||
|
To connect to online servers your bot will need an official Microsoft/Minecraft account. You can use your own personal one, but will need another account if you want to connect with it. Here is an example settings for this:
|
||||||
|
```
|
||||||
|
{
|
||||||
|
"minecraft_version": "1.20.4",
|
||||||
|
"host": "111.222.333.444",
|
||||||
|
"port": 55920,
|
||||||
|
"auth": "microsoft",
|
||||||
|
"allow_insecure_coding": false
|
||||||
|
}
|
||||||
|
```
|
||||||
|
‼️Make sure your bot's name in the profile.json matches the account name! Otherwise the bot will spam talk to itself.
|
||||||
|
|
||||||
Bot profiles are json files (such as `andy.json`) that define a bot's behavior in three ways:
|
### Bot Profiles
|
||||||
|
|
||||||
|
Bot profiles are json files (such as `andy.json`) that define:
|
||||||
|
|
||||||
1. Bot backend LLMs to use for chat and embeddings.
|
1. Bot backend LLMs to use for chat and embeddings.
|
||||||
2. Prompts used to influence the bot's behavior.
|
2. Prompts used to influence the bot's behavior.
|
||||||
3. Examples retrieved and provided to the bot to help it better perform tasks.
|
3. Examples help the bot perform tasks.
|
||||||
|
|
||||||
|
|
||||||
### Model Specifications
|
### Model Specifications
|
||||||
|
|
||||||
|
@ -84,19 +103,6 @@ Thus, all the below specifications are equivalent to the above example:
|
||||||
"embedding": "openai"
|
"embedding": "openai"
|
||||||
```
|
```
|
||||||
|
|
||||||
## Online Servers
|
|
||||||
To connect to online servers your bot will need an official Microsoft/Minecraft account. You can use your own personal one, but will need another account if you want to connect with it. Here is an example settings for this:
|
|
||||||
```
|
|
||||||
{
|
|
||||||
"minecraft_version": "1.20.4",
|
|
||||||
"host": "111.222.333.444",
|
|
||||||
"port": 55920,
|
|
||||||
"auth": "microsoft",
|
|
||||||
"allow_insecure_coding": false
|
|
||||||
}
|
|
||||||
```
|
|
||||||
‼️Make sure your bot's name in the profile.json matches the account name! Otherwise the bot will spam talk to itself.
|
|
||||||
|
|
||||||
## Patches
|
## Patches
|
||||||
|
|
||||||
Some of the node modules that we depend on have bugs in them. To add a patch, change your local node module file and run `npx patch-package [package-name]`
|
Some of the node modules that we depend on have bugs in them. To add a patch, change your local node module file and run `npx patch-package [package-name]`
|
||||||
|
|
Loading…
Add table
Reference in a new issue