mirror of
https://github.com/kolbytn/mindcraft.git
synced 2025-08-02 13:25:31 +02:00
Updated README.md: updated docker instruction plus some formatting
This commit is contained in:
parent
60bc2299ea
commit
906df6f6e4
1 changed files with 14 additions and 8 deletions
22
README.md
22
README.md
|
@ -50,19 +50,23 @@ You can configure project details in `settings.js`. [See file for more details](
|
||||||
|
|
||||||
If you intent to `allow_insecure_coding`, it might be a good idea to put the whole app into a docker container to reduce risks of running unknown code.
|
If you intent to `allow_insecure_coding`, it might be a good idea to put the whole app into a docker container to reduce risks of running unknown code.
|
||||||
|
|
||||||
```
|
```bash
|
||||||
docker run -i -t --rm -v $(pwd):/app -w /app node:latest node main.js
|
docker run -i -t --rm -v $(pwd):/app -w /app node:latest node main.js
|
||||||
```
|
```
|
||||||
|
or simply
|
||||||
|
```bash
|
||||||
|
docker-compose up
|
||||||
|
```
|
||||||
|
|
||||||
When running in docker, if you want the bot to join your local minecraft server, you have to use a special host address `host.docker.internal` to call your localhost from inside your docker container. Put this into your [settings.js](settings.js):
|
When running in docker, if you want the bot to join your local minecraft server, you have to use a special host address `host.docker.internal` to call your localhost from inside your docker container. Put this into your [settings.js](settings.js):
|
||||||
|
|
||||||
```
|
```javascript
|
||||||
"host": "host.docker.internal", // instead of "localhost", to join your local minecraft from inside the docker container
|
"host": "host.docker.internal", // instead of "localhost", to join your local minecraft from inside the docker container
|
||||||
```
|
```
|
||||||
|
|
||||||
### Online Servers
|
### 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 are example settings for this:
|
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 are example settings for this:
|
||||||
```
|
```javascript
|
||||||
"host": "111.222.333.444",
|
"host": "111.222.333.444",
|
||||||
"port": 55920,
|
"port": 55920,
|
||||||
"auth": "microsoft",
|
"auth": "microsoft",
|
||||||
|
@ -83,13 +87,15 @@ Bot profiles are json files (such as `andy.json`) that define:
|
||||||
|
|
||||||
By default, the program will use the profiles specified in `settings.js`. You can specify one or more agent profiles using the `--profiles` argument:
|
By default, the program will use the profiles specified in `settings.js`. You can specify one or more agent profiles using the `--profiles` argument:
|
||||||
|
|
||||||
`node main.js --profiles ./profiles/andy.json ./profiles/jill.json`
|
```bash
|
||||||
|
node main.js --profiles ./profiles/andy.json ./profiles/jill.json
|
||||||
|
```
|
||||||
|
|
||||||
### Model Specifications
|
### Model Specifications
|
||||||
|
|
||||||
LLM backends can be specified as simply as `"model": "gpt-3.5-turbo"`. However, for both the chat model and the embedding model, the bot profile can specify the below attributes:
|
LLM backends can be specified as simply as `"model": "gpt-3.5-turbo"`. However, for both the chat model and the embedding model, the bot profile can specify the below attributes:
|
||||||
|
|
||||||
```
|
```json
|
||||||
"model": {
|
"model": {
|
||||||
"api": "openai",
|
"api": "openai",
|
||||||
"url": "https://api.openai.com/v1/",
|
"url": "https://api.openai.com/v1/",
|
||||||
|
@ -108,15 +114,15 @@ If the embedding field is not specified, then it will use the default embedding
|
||||||
|
|
||||||
Thus, all the below specifications are equivalent to the above example:
|
Thus, all the below specifications are equivalent to the above example:
|
||||||
|
|
||||||
```
|
```json
|
||||||
"model": "gpt-3.5-turbo"
|
"model": "gpt-3.5-turbo"
|
||||||
```
|
```
|
||||||
```
|
```json
|
||||||
"model": {
|
"model": {
|
||||||
"api": "openai"
|
"api": "openai"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
```
|
```json
|
||||||
"model": "gpt-3.5-turbo",
|
"model": "gpt-3.5-turbo",
|
||||||
"embedding": "openai"
|
"embedding": "openai"
|
||||||
```
|
```
|
||||||
|
|
Loading…
Add table
Reference in a new issue