diff --git a/README.md b/README.md index d85a88d..cd5e992 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,9 @@ See wiki [here](https://saysth.ranzeplay.space). ## Versions -- **1.0 (1.21)** +- **1.1 (1.21.4)** + +- 1.0 (1.21) - 0.3 (1.21) diff --git a/docs/blog/2024-12-30-v1.1-release-blog.md b/docs/blog/2024-12-30-v1.1-release-blog.md new file mode 100644 index 0000000..74a0eec --- /dev/null +++ b/docs/blog/2024-12-30-v1.1-release-blog.md @@ -0,0 +1,25 @@ +--- +slug: v1.1-release-blog +title: v1.1 Release +authors: jeb +tags: [announcement, release] +date: 2024-12-30T21:23 +--- + +# SaySomething + +Bug fixes and add detailed logging. + + + +## Features + +- Add detailed logging when chat fails. + +## Fixes + +- No longer need to add `Bearer ` to the front of OpenAI platform API keys. + +For more details, see the latest [wiki](https://saysth.ranzeplay.space/docs/intro). + +We hope you enjoy the new version. diff --git a/docs/docs/intro.md b/docs/docs/intro.md index bdbb594..c5496bd 100644 --- a/docs/docs/intro.md +++ b/docs/docs/intro.md @@ -30,7 +30,9 @@ See wiki [here](https://saysth.ranzeplay.space). ## Versions -- **1.0 (1.21)** +- **1.1 (1.21.4)** + +- 1.0 (1.21) - 0.3 (1.21) diff --git a/docs/versioned_docs/version-1.1/config/_category_.json b/docs/versioned_docs/version-1.1/config/_category_.json new file mode 100644 index 0000000..b571581 --- /dev/null +++ b/docs/versioned_docs/version-1.1/config/_category_.json @@ -0,0 +1,3 @@ +{ + "label": "Configuration" +} diff --git a/docs/versioned_docs/version-1.1/config/character-prompts.md b/docs/versioned_docs/version-1.1/config/character-prompts.md new file mode 100644 index 0000000..61a31a6 --- /dev/null +++ b/docs/versioned_docs/version-1.1/config/character-prompts.md @@ -0,0 +1,30 @@ +# Villager character prompts + +## Villager prompt template + +Configuration in the `saysth/saysth-sys-msg-template.txt`, you will see the default content below: + +```md +You are a creative and intelligent AI assistant engaged in an uncensored iterative storytelling experience. +It is vital that you follow all the role play rules and guidelines below: +1. You are a villager in Minecraft. +2. Your name is {name}. +3. You are a {personality} guy. +4. Your profession is {profession}. +5. You live in {livingIn}, it might be a place or environment. +6. You use emeralds as currency. +7. You should reply using the same language as the other said +8. You should response "IGN" if the user speaks to someone other than you, you should not response "IGN." or anything else. +9. You should speak a bit more concisely since you cannot speak too much at once. +10. You tend to know the other's name first when conversation starts. +11. You can set other things which are not being mentioned here by yourself. +``` + +You can edit the default prompt applied to each new villager. + +## Variables + +- `{name}`: Villager's name, initialized randomly referred to configuration. +- `{personality}`: Villager's personality, initialized randomly referred to configuration. +- `{livingIn}`: The place where the villager lives in, initialized according to game data. +- `{profession}`: The profession of the villager, initialized according to game data. diff --git a/docs/versioned_docs/version-1.1/config/main.md b/docs/versioned_docs/version-1.1/config/main.md new file mode 100644 index 0000000..4064824 --- /dev/null +++ b/docs/versioned_docs/version-1.1/config/main.md @@ -0,0 +1,36 @@ +# Main config + +## Content + +Configuration in the `saysth/saysth-config.json`, you will see the content below: + +```json +{ + "personalities": [], + "nameCandidates": [], + "conclusionMessageLimit": 10, + "villagerChatPrefix": "$", + "useExistingVillagerName": true, + "showTimeConsumption": false, + "timeoutSeconds": 10, + "apiConfigPlatform": "cloudflare" +} +``` + +- `personalities`: A list of string that describes the personality of a villager. +- `nameCandidates`: A list of string of names that will be put on villagers. +- `conclusionMessageLimit`: When messages reach this limit, it will be concluded into one concise message. +- `villagerChatPrefix`: Add the string at the beginning of chat message to show that you are talking to villagers. +- `useExistingVillagerName`: Use the existing name of a villager according to `CustomName` if possible. +- `showTimeConsumption`: Show how much time consumed between sending to receiving. +- `timeoutSconds`: Time time limit of each request to the LLM model. +- `apiConfigPlatform`: The platform of the LLM/AI model. We currently support 3 types of platforms. + - `cloudflare`: Cloudflare AI worker. + - `openai`: OpenAI. + - `openai-compatible`: OpenAI-compatible interfaces. + +## Remark + +For NeoForge and Fabric, the config directory is `config/saysth` relative to the game jar file. + +For Spigot, the config directory is `plugins/saysth` relative to the `spigot.jar`. diff --git a/docs/versioned_docs/version-1.1/config/platform.md b/docs/versioned_docs/version-1.1/config/platform.md new file mode 100644 index 0000000..c688920 --- /dev/null +++ b/docs/versioned_docs/version-1.1/config/platform.md @@ -0,0 +1,46 @@ +# Platform-specific config + +## Cloudflare + +```json +{ + "modelName": "@cf/qwen/qwen1.5-14b-chat-awq", + "accountId": "", + "apiKey": "xxx-xxx-xxx" +} +``` + +- `modelName`: The name of the AI model to use, must be exist on Cloudflare and you have access to it. + +- `accountId`: The account ID of your Cloudflare account, it could be the tail route when you access https://dash.cloudflare.com/ . + +- `apiKey`: An API key issued by your account, must be valid and have permission `Account.Workers AI`. + +## OpenAI + +```json +{ + "authCredentials": "xxx-xxx-xxx", + "modelName": "gpt-4" +} +``` + +- `authCredentials`: Authorization credentials, will be added into `Autorizations` header. + +- `modelName`: The name of the model you use. + +## OpenAI-compatible + +```json +{ + "authCredentials": "xxx-xxx-xxx", + "modelName": "gpt-4", + "chatCompletionEndpoint": "https://.../v1/chat/completion" +} +``` + +- `authCredentials`: Authorization credentials, will be added into `Autorizations` header. + +- `modelName`: The name of the model you use. + +- `chatCompletionEndpoint`: The URL to POST messages. If you use LM Studio, you may use `http://localhost:/v1/chat/completion` where `port` is the port that LM Studio is listening on. diff --git a/docs/versioned_docs/version-1.1/intro.md b/docs/versioned_docs/version-1.1/intro.md new file mode 100644 index 0000000..c5496bd --- /dev/null +++ b/docs/versioned_docs/version-1.1/intro.md @@ -0,0 +1,45 @@ +--- +sidebar_position: 1 +--- + +# Introduction + +![Modrinth Downloads](https://img.shields.io/modrinth/dt/say-something) +![GitHub commit activity](https://img.shields.io/github/commit-activity/m/ranzeplay/saysth) +![GitHub contributors](https://img.shields.io/github/contributors/ranzeplay/saysth) + +A Minecraft Mod that connects villagers to remote AI models. + +## Basic information + +- [GitHub](https://github.com/Ranzeplay/saysth) + +- [Modrinth](https://modrinth.com/mod/say-something/) + +## Wiki + +See wiki [here](https://saysth.ranzeplay.space). + +## Features + +- Multiple AI platforms support. + +- Make use of villager's data, such as trades and profession. + +- Auto conclude conversation so that it won't get too long. + +## Versions + +- **1.1 (1.21.4)** + +- 1.0 (1.21) + +- 0.3 (1.21) + +- 0.2 (1.20.1) + +- 0.1 (1.20.1, 1.21) + +## License + +[MIT License](https://github.com/Ranzeplay/saysth/blob/master/LICENSE) diff --git a/docs/versioned_docs/version-1.1/support.md b/docs/versioned_docs/version-1.1/support.md new file mode 100644 index 0000000..3833be7 --- /dev/null +++ b/docs/versioned_docs/version-1.1/support.md @@ -0,0 +1,5 @@ +# Support + +Issue tracker: [Issues - Github](https://github.com/Ranzeplay/saysth/issues) + +Mod page: [SaySomething - Modrinth](https://modrinth.com/mod/say-something/) diff --git a/docs/versioned_docs/version-1.1/upgrading.md b/docs/versioned_docs/version-1.1/upgrading.md new file mode 100644 index 0000000..b0f2fdc --- /dev/null +++ b/docs/versioned_docs/version-1.1/upgrading.md @@ -0,0 +1,4 @@ +# Upgrading + +v1.0 makes huge changes in configurations including structure and file content, +please refer to config pages for more details. diff --git a/docs/versioned_docs/version-1.1/usage.md b/docs/versioned_docs/version-1.1/usage.md new file mode 100644 index 0000000..c6541cb --- /dev/null +++ b/docs/versioned_docs/version-1.1/usage.md @@ -0,0 +1,11 @@ +# Usage + +## Chat format + +Put `$` sign at the beginning of your chat message to talk to villagers in front of you. + +Villagers may not respond if your message isn't related to them. + +## After v0.3 + +You can also change the prefix sign in [config](./config/main#content) diff --git a/docs/versioned_sidebars/version-1.1-sidebars.json b/docs/versioned_sidebars/version-1.1-sidebars.json new file mode 100644 index 0000000..39332bf --- /dev/null +++ b/docs/versioned_sidebars/version-1.1-sidebars.json @@ -0,0 +1,8 @@ +{ + "docsSidebar": [ + { + "type": "autogenerated", + "dirName": "." + } + ] +} diff --git a/docs/versions.json b/docs/versions.json index 6ad819d..b1bd2fc 100644 --- a/docs/versions.json +++ b/docs/versions.json @@ -1,4 +1,5 @@ [ + "1.1", "1.0", "0.3", "0.2", diff --git a/gradle.properties b/gradle.properties index b2a9493..73acc83 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ org.gradle.jvmargs=-Xmx4G org.gradle.parallel=true # Mod properties -mod_version=1.0 +mod_version=1.1 maven_group=space.ranzeplay archives_name=saysth enabled_platforms=fabric,neoforge