File tree Expand file tree Collapse file tree 6 files changed +37
-0
lines changed Expand file tree Collapse file tree 6 files changed +37
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ export const CONFIG_DEFAULT = {
14
14
apiKey : '' ,
15
15
systemMessage : '' ,
16
16
showTokensPerSecond : false ,
17
+ showServerInformation : false ,
17
18
showThoughtInProgress : false ,
18
19
excludeThoughtOnReq : true ,
19
20
pasteLongTextToFileLen : 2500 ,
Original file line number Diff line number Diff line change @@ -189,6 +189,29 @@ export default function ChatMessage({
189
189
</ div >
190
190
</ div >
191
191
) }
192
+
193
+ { /* render model information if enabled and available */ }
194
+ { config . showServerInformation && msg . serverProps && (
195
+ < >
196
+ < br />
197
+ < div className = "dropdown dropdown-hover dropdown-top" >
198
+ < div
199
+ tabIndex = { 0 }
200
+ role = "button"
201
+ className = "cursor-pointer font-semibold text-sm opacity-60"
202
+ >
203
+ Model:{ ' ' }
204
+ { msg . serverProps . model_path ?. split ( / ( \\ | \/ ) / ) . pop ( ) }
205
+ </ div >
206
+ < div className = "dropdown-content bg-base-100 z-10 w-80 p-2 shadow mt-4" >
207
+ < b > Server Information</ b >
208
+ < br /> - Path: { msg . serverProps . model_path }
209
+ < br /> - Build: { msg . serverProps . build_info }
210
+ < br /> - Context: { msg . serverProps . n_ctx }
211
+ </ div >
212
+ </ div >
213
+ </ >
214
+ ) }
192
215
</ >
193
216
) }
194
217
</ div >
Original file line number Diff line number Diff line change @@ -202,6 +202,11 @@ const SETTING_SECTIONS: SettingSection[] = [
202
202
label : 'Show tokens per second' ,
203
203
key : 'showTokensPerSecond' ,
204
204
} ,
205
+ {
206
+ type : SettingInputType . CHECKBOX ,
207
+ label : 'Show server information' ,
208
+ key : 'showServerInformation' ,
209
+ } ,
205
210
{
206
211
type : SettingInputType . LONG_INPUT ,
207
212
label : (
Original file line number Diff line number Diff line change @@ -188,6 +188,13 @@ export const AppContextProvider = ({
188
188
content : null ,
189
189
parent : leafNodeId ,
190
190
children : [ ] ,
191
+ serverProps : serverProps
192
+ ? {
193
+ model_path : serverProps . model_path ,
194
+ build_info : serverProps . build_info ,
195
+ n_ctx : serverProps . n_ctx ,
196
+ }
197
+ : null ,
191
198
} ;
192
199
setPending ( convId , pendingMsg ) ;
193
200
Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ export interface Message {
43
43
content : string ;
44
44
timings ?: TimingReport ;
45
45
extra ?: MessageExtra [ ] ;
46
+ serverProps ?: LlamaCppServerProps | null ;
46
47
// node based system for branching
47
48
parent : Message [ 'id' ] ;
48
49
children : Message [ 'id' ] [ ] ;
You can’t perform that action at this time.
0 commit comments