Spaces:
Runtime error
Runtime error
File size: 3,480 Bytes
302ee5a 3519e3c 302ee5a |
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 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 |
from chainlit.input_widget import Select, Slider, Switch, TextInput
from utils import MODELS_PROVIDERS_MAP, REASONER_PROVIDERS_MAP
OPEN_LLM_SETTINGS = [
Select(
id="Model",
label="Llm",
values=list(MODELS_PROVIDERS_MAP.keys()),
initial_index=0,
),
Slider(
id="Temperature",
label="Temperature",
initial=0,
min=0,
max=1,
step=0.1,
),
Slider(
id="Max Tokens",
label="Max Tokens",
initial=1024,
min=512,
max=8192,
step=256,
),
TextInput(
id="System Prompt",
label="System Prompt",
initial="You are a helpful assistant."
),
Switch(
id="Use Reasoner",
label="Use reasoner model",
initial=True
)
]
REASONER_SETTINGS = [
Select(
id="Reasoner Model",
label="Reasoner Llm",
values=list(REASONER_PROVIDERS_MAP.keys()),
initial_index=0,
),
Slider(
id="Reasoner Temperature",
label="Reasoner Temperature",
initial=0.5,
min=0,
max=1,
step=0.1,
),
Slider(
id="Reasoner Max Tokens",
label="Reasoner Max Tokens",
initial=1024,
min=512,
max=4096,
step=256,
),
TextInput(
id="Reasoner System Prompt",
label="Reasoner System Prompt",
initial="You are a helpfull assistant with reasoning capabilites that breaks down problems into the detailed steps required to solve them"
),
]
OPEN_AI_REASONER_SETTINGS = [
Select(
id="Reasoner Model",
label="Reasoner Llm",
values=list(REASONER_PROVIDERS_MAP.keys()),
initial_index=0,
),
TextInput(
id="Reasoner Api Key",
label="Reasoner Api Key",
initial="your api key goes here..."
),
Slider(
id="Reasoner Temperature",
label="Reasoner Temperature",
initial=0.5,
min=0,
max=1,
step=0.1,
),
Slider(
id="Reasoner Max Tokens",
label="Reasoner Max Tokens",
initial=1024,
min=512,
max=4096,
step=256,
),
TextInput(
id="Reasoner System Prompt",
label="Reasoner System Prompt",
initial="You are a helpfull assistant with reasoning capabilites that breaks down problems into the detailed steps required to solve them"
),
]
OPEN_AI_SETTINGS = [
TextInput(
id="Model",
label="Llm",
initial="gpt-4o-mini"
),
TextInput(
id="Api Key",
label="Api Key",
initial="your api key goes here..."
),
TextInput(
id="Base Url",
label="Base Url",
initial="leave this empty to connect to chatGPT"
),
Slider(
id="Temperature",
label="Temperature",
initial=0,
min=0,
max=1,
step=0.1,
),
Slider(
id="Max Tokens",
label="Max Tokens",
initial=1024,
min=512,
max=8192,
step=256,
),
TextInput(
id="System Prompt",
label="System Prompt",
initial="You are a helpful assistant."
),
Switch(
id="Use Reasoner",
label="Use reasoner model",
initial=True
)
]
PROFILES_SETTINGS = {
"Reasoner4All": OPEN_LLM_SETTINGS + REASONER_SETTINGS,
"OpenAi": OPEN_AI_SETTINGS + OPEN_AI_REASONER_SETTINGS
}
|