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 = {
1414 apiKey : '' ,
1515 systemMessage : '' ,
1616 showTokensPerSecond : false ,
17+ showServerInformation : false ,
1718 showThoughtInProgress : false ,
1819 excludeThoughtOnReq : true ,
1920 pasteLongTextToFileLen : 2500 ,
Original file line number Diff line number Diff line change @@ -189,6 +189,29 @@ export default function ChatMessage({
189189 </ div >
190190 </ div >
191191 ) }
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+ ) }
192215 </ >
193216 ) }
194217 </ div >
Original file line number Diff line number Diff line change @@ -202,6 +202,11 @@ const SETTING_SECTIONS: SettingSection[] = [
202202 label : 'Show tokens per second' ,
203203 key : 'showTokensPerSecond' ,
204204 } ,
205+ {
206+ type : SettingInputType . CHECKBOX ,
207+ label : 'Show server information' ,
208+ key : 'showServerInformation' ,
209+ } ,
205210 {
206211 type : SettingInputType . LONG_INPUT ,
207212 label : (
Original file line number Diff line number Diff line change @@ -188,6 +188,13 @@ export const AppContextProvider = ({
188188 content : null ,
189189 parent : leafNodeId ,
190190 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 ,
191198 } ;
192199 setPending ( convId , pendingMsg ) ;
193200
Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ export interface Message {
4343 content : string ;
4444 timings ?: TimingReport ;
4545 extra ?: MessageExtra [ ] ;
46+ serverProps ?: LlamaCppServerProps | null ;
4647 // node based system for branching
4748 parent : Message [ 'id' ] ;
4849 children : Message [ 'id' ] [ ] ;
You can’t perform that action at this time.
0 commit comments