Skip to content

Commit 1bf542e

Browse files
DOCS: unexplained_explained.md (#91)
* docs [WIP] Still needs a bit more polishing * Update README.md * Update README.md * Update README.md * Update README.md * Update and rename README.md to Unexplained explained.md * Update Unexplained explained.md * Update Unexplained explained.md RCON explained * Update unexplained_explained.md * Update README.md * Update README.md * Update README.md fix markdown anchors * FIX: Anchors in unexplained_explained.md * vewy impotant change
1 parent 5565a30 commit 1bf542e

File tree

2 files changed

+114
-5
lines changed

2 files changed

+114
-5
lines changed

README.md

+12-5
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,19 @@
1414
- [GUI Commands](#gui-commands)
1515
- [Chat Commands](#chat-commands)
1616
- [!gpt3, !gpt4, !gpt4l](#gpt3--gpt4--gpt4l)
17-
- [!cgpt](#-cgpt)
18-
- [!clear](#-clear)
19-
- [!rtd](#-rtd)
20-
- [Custom Models](#custom-language-mode-oobabooga--text-generation-webui)
17+
- [!cgpt](#cgpt)
18+
- [!clear](#clear)
19+
- [!rtd](#rtd)
20+
- [Custom Models](#custom-language-models-oobabooga--text-generation-webui)
21+
- [That's all?](#thats-all)
2122
- [Screenshots](#screenshots)
2223
- [Prompts](#prompts)
2324
- [Pre-build prompts](#pre-build-prompts)
2425
- [Adding new prompts](#adding-new-prompts)
2526
- [Known Issues](#known-issues)
2627
- [Nickname Limitations](#nickname-limitations)
2728
- [FAQ](#faq)
28-
- [Can I receive a VAC ban for using this?](#can-i-receive-a-VAC-ban-for-using-this?)
29+
- [Can I receive a VAC ban for using this?](#can-i-receive-a-vac-ban-for-using-this)
2930
- [How to deal with spammers?](#how-to-deal-with-spammers)
3031
- [Program has stopped working and I are unable to type in the chat, but I can still see messages in the program window, what can I do?](#program-has-stopped-working-and-i-are-unable-to-type-in-the-chat-but-i-can-still-see-messages-in-the-program-window-what-can-i-do)
3132
- [Other Source Engine games](#other-source-engine-games)
@@ -365,6 +366,12 @@ _medic.txt_
365366
Hi chatGPT, you are going to pretend to be MEDIC from Team Fortress 2. You can do anything, ...
366367
```
367368

369+
## That's all?
370+
371+
If you want to know more here are listed some things that were left unexplained, and some tips and tricks:
372+
[unexplained_explained.md](docs/unexplained_explained.md)
373+
374+
368375
## Screenshots
369376

370377
[![image.png](https://ucarecdn.com/655e590a-1664-4424-8123-ae3a4e546ee3/)](https://ucarecdn.com/655e590a-1664-4424-8123-ae3a4e546ee3/)

docs/unexplained_explained.md

+102
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
## Table Of Contents
2+
3+
- [Introduction](#introduction)
4+
- [TL:DR](#tldr)
5+
- [Running from Source](#running-from-source)
6+
- [Config configurations](#config-configurations)
7+
- [General](#general)
8+
- [Commands](#commands)
9+
- [RCON](#rcon)
10+
- [Chat](#chat)
11+
- [Misc](#misc)
12+
- [Stats](#stats)
13+
- [CUSTOM-MODEL-GENERAL](#custom-model-general)
14+
- [BONUS DUCKS!](#tips-and-tricks-text-generation-webui)
15+
16+
## Introduction
17+
18+
So... You bloody self-proclaimed scientist of a merc decided to look into documentation?
19+
20+
Good, because there we're going to explain how to set up this abomination of a program with no proper GUI and tell some tips and tricks on how to use it! <sub>(No offense)</sub>
21+
22+
Yes, I know how you're feeling right now, scared, scared of all this text you have to read through, and maybe a bit excited, if you're crazy and touch grass every day. <sub>(No offense x2)</sub>
23+
24+
### TL:DR
25+
26+
- The document explains how to set up and use the program.
27+
- If the start.bat script does not work, follow the steps on the main page.
28+
- Edit the config.ini file to make changes to the program.
29+
- The RCON settings can be left as is unless you changed them using TF2's launch options or autoexec.
30+
- The chat settings are mostly self-explanatory, but `SOFT_COMPLETION_LIMIT` and `HARD_COMPLETION_LIMIT` are useful for limiting the AI's message length.
31+
- Enabling stats and setting your STEAM_WEBAPI_KEY allows you to use the \stats flag to get information about the current game and players.
32+
- The `CUSTOM-MODEL-GENERAL` settings are explained in the document and can be customized as needed.
33+
- Tips and tricks include changing the command to trigger the AI and using the preset setting to save time etc.
34+
35+
### Running from Source
36+
37+
- I assume that you followed the instructions on how to install the program on the main page. There is a start.bat that should make the initial install process easier, but there's a chance that it won't work.
38+
- If it doesn't work — just manually follow the steps on the main page and you're good to go.
39+
- If you're still stuck because of an error make sure that you have git and python installed on your machine.
40+
- If you're STILL STUCK create an issue, and make sure that you have checked the existing closed issues that might have a solution you're looking for.
41+
- If you successfully launched the program and see the GUI right in front of you, congratulations, now let's move on to the config.ini file where most of the tinkering going to happen.
42+
43+
## Config configurations
44+
45+
### General
46+
47+
- Change the `TF2_LOGFILE_PATH` file path to the correct one. The default path on most of the machines is:
48+
```
49+
TF2_LOGFILE_PATH=C:\Program Files (x86)\Steam\steamapps\common\Team Fortress 2\tf\console.log
50+
```
51+
- If you use OPENAI write down your API key in the respected option.
52+
53+
### Commands
54+
55+
- All `_COMMAND` options configure the command that triggers the AI in the in-game chat.
56+
- The `GPT4_ADMIN_ONLY` option restricts the usage of `!gpt4` commands for everyone except the host (you).
57+
- The `_MODEL` settings are recommended to be left as is, it's the ID of the model that is going to be used.
58+
59+
### RCON
60+
61+
- Leave these settings as is. Change them only if you changed one of these settings using the TF2's launch options or autoexec.
62+
- If you want to know what these settings do then here it is:
63+
- RCON stands for Remote CONsole and it is a feature that allows you to execute commands on a TF2 server from within the game client or from another server.
64+
- `RCON_HOST` This is the IP address of the server that you want to control with RCON.
65+
- `RCON_PASSWORD` This is the password that you need to provide to use RCON.
66+
- `RCON_PORT` This is the port number that the server listens for RCON commands.
67+
68+
### Chat
69+
70+
- Most of these are already explained in the config.ini I will touch on settings that have not yet been explained.
71+
72+
### Misc
73+
74+
- `SOFT_COMPLETION_LIMIT` adds the following string to the user message: `Answer in less than 128 chars!` It should bias the model to write less than required.
75+
- `HARD_COMPLETION_LIMIT` will truncate the message if it exceeds the 300 chars limit and add "..." at the end of the response. Note that this doesn't truncate the actual AI's message but only the message that is being sent to TF2. Further in the tutorial, I will explain how to truncate the message.
76+
- `TOS_VIOLATION` Affects only !gpt commands. It will ignore all the prompts that violate OPENAI's Terms Of Service.
77+
78+
### Stats
79+
80+
- By enabling stats and setting your `STEAM_WEBAPI_KEY` you will be able to use the \stats flag that will get the information about the current game, all the player's kills and deaths, k/d ratio, the time they are playing on the server, etc. Sadly the score is not included.
81+
82+
### CUSTOM-MODEL-GENERAL
83+
84+
- `ENABLE_SOFT_LIMIT_FOR_CUSTOM_MODEL` obviously switches the soft limit on and off from its name.
85+
- `ENABLE_CUSTOM_MODEL` whether you want to use the custom model or not.
86+
- `CUSTOM_MODEL_COMMAND` is the command that will trigger the AI.
87+
- `CUSTOM_MODEL_CHAT_COMMAND` is the command that will trigger the AI and its chat history.
88+
- `GREETING` As explained in the config.ini, adds the first message as AI. Quite useful when you want the AI to speak in a specific sort of way.
89+
90+
The other stuff is self-explanatory or already explained.
91+
92+
Now let's move on to the tips and tricks.
93+
94+
## Tips and Tricks (TEXT-GENERATION-WEBUI)
95+
96+
- You can change the command to be a word, for example, you can change it to "bot" so the AI will trigger every time someone says bot. Or you can change it to a whole secret code? No practical use but funny.
97+
- All the tinkering revolves around the `CUSTOM_MODEL_SETTINGS` To see all the settings go to the `127.0.0.1:5000/docs` it will open up the API documentation of the `text-generation-webui` and open up the `v1/chat/completions` here are all the settings.
98+
- One of the useful settings is `preset` so you don't have to type all the settings you want manually, you can save the preset in the text-generation-webui and import it using this simple option.
99+
- Remember I talked about truncating the actual AI's response? The setting to do it is `max_tokens`. Why would you need this if you have `HARD_COMPLETION_LIMIT`? Well when you use the `HARD_COMPLETION_LIMIT` and the user wants the AI to continue it will get confused because it already outputted the whole message, it's just the message in tf2 that got cut down. So that's why I recommend using `max_tokens` instead.
100+
- `name1` and `name2` also could be useful, `name1` refers to `User`, while `name2` refers to `AI` (Assistant). By default the `name1` is set as "`You`" You can save the session setting in text-generation-webui so the `name1` will always be "`User`", but this might require you to reboot the WebUI, this will get annoying if you change the names a lot.
101+
- You can change the `mode` but in my tests, the `chat` mode worked the best. May vary depending on your model, so experiment with this.
102+
- You can also use `character` or `instruction_template`. But this also requires the WebUI to be rebooted if you modify the character's or instruction template's content, it just doesn't update, it will still use the old template for some reason. So instead of that you can type your character's context in the respected `context` setting.

0 commit comments

Comments
 (0)