forked from xNul/chat-llama-discord-bot
-
Notifications
You must be signed in to change notification settings - Fork 4
/
config.py
64 lines (61 loc) · 2.11 KB
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
discord = {'TOKEN': "YOURDISCORDTOKENHERE" }
sd = {
'A1111' : "http://127.0.0.1:7860", #This is the default URL for the A1111 API. If you don't have one, dont worry about it.
'payload' : {
'restore_faces': True,
'sampler_name': "DPM++ 2M Karras",
'steps': 20,
'cfg_scale': 5,
'enable_hr': False,
'hr_upscaler': "4x-UltraSharp",
'denoising_strength': 0.55,
'hr_scale': 2,
'hr_second_pass_steps': 20,
'seed_resize_from_h': 0,
'seed_resize_from_w': 0
}
}
llm = {
'state': {
'max_new_tokens': 400,
'seed': -1.0,
'temperature': 0.7,
'top_p': 0.1,
'top_k': 40,
'typical_p': 1,
'repetition_penalty': 1.18,
'repetition_penalty_range': 0,
'encoder_repetition_penalty': 1,
'no_repeat_ngram_size': 0,
'min_length': 50,
'do_sample': True,
'penalty_alpha': 0,
'num_beams': 1,
'length_penalty': 1,
'early_stopping': False,
'add_bos_token': True,
'ban_eos_token': False,
'skip_special_tokens': True,
'truncation_length': 2048,
'custom_stopping_strings': '"### Assistant","### Human","</END>"',
'greeting': "",
'end_of_turn': "",
'chat_prompt_size': 2048,
'chat_generation_attempts': 1,
'stop_at_newline': False,
'mode': "cai-chat",
'stream': True
}
}
behavior = {
# Numbers indicate a chance. 0 never happens. 1 always happens.
'reply_with_image' : 0,
'change_username_with_character' : True,
'change_avatar_with_character' : True,
'only_speak_when_spoken_to' : True,
'ignore_parenthesis' : True,
'reply_to_itself' : 0,
'chance_to_reply_to_other_bots' : 0.3, #Reduce this if bot is too chatty with other bots
'reply_to_bots_when_adressed' : 0.5, # If set to 1, bots can be stuck in an infinite conversation
'go_wild_in_channel' : True,
'conversation_recency' : 600}