File tree Expand file tree Collapse file tree 2 files changed +24
-1
lines changed
extensions/llamacpp-extension Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change 153153 {
154154 "key" : " cont_batching" ,
155155 "title" : " Continuous Batching" ,
156- "description" : " Enable continuous batching (a.k.a dynamic batching) for concurrent requests (default: enabled) ." ,
156+ "description" : " Enable continuous batching (a.k.a dynamic batching) for concurrent requests." ,
157157 "controllerType" : " checkbox" ,
158158 "controllerProps" : {
159159 "value" : false
Original file line number Diff line number Diff line change @@ -210,6 +210,29 @@ export const useModelProvider = create<ModelProviderState>()(
210210 {
211211 name : localStorageKey . modelProvider ,
212212 storage : createJSONStorage ( ( ) => localStorage ) ,
213+ migrate : ( persistedState : unknown , version : number ) => {
214+ const state = persistedState as ModelProviderState
215+
216+ // Migration for cont_batching description update (version 0 -> 1)
217+ if ( version === 0 && state ?. providers ) {
218+ state . providers = state . providers . map ( ( provider ) => {
219+ if ( provider . provider === 'llamacpp' && provider . settings ) {
220+ provider . settings = provider . settings . map ( ( setting ) => {
221+ if ( setting . key === 'cont_batching' ) {
222+ return {
223+ ...setting ,
224+ description : 'Enable continuous batching (a.k.a dynamic batching) for concurrent requests.'
225+ }
226+ }
227+ return setting
228+ } )
229+ }
230+ return provider
231+ } )
232+ }
233+ return state
234+ } ,
235+ version : 1 ,
213236 }
214237 )
215238)
You can’t perform that action at this time.
0 commit comments