ollama source for Momentry Core verification
This commit is contained in:
32
server/model_caches.go
Normal file
32
server/model_caches.go
Normal file
@@ -0,0 +1,32 @@
|
||||
package server
|
||||
|
||||
import "context"
|
||||
|
||||
type modelCaches struct {
|
||||
recommendations *modelRecommendationsCache
|
||||
show *modelShowCache
|
||||
modelList *modelListCache
|
||||
}
|
||||
|
||||
func newModelCaches() *modelCaches {
|
||||
return &modelCaches{
|
||||
recommendations: newModelRecommendationsCache(),
|
||||
show: newModelShowCache(),
|
||||
modelList: newModelListCache(),
|
||||
}
|
||||
}
|
||||
|
||||
func (c *modelCaches) Start(ctx context.Context) {
|
||||
if c == nil {
|
||||
return
|
||||
}
|
||||
if c.recommendations != nil {
|
||||
c.recommendations.Start(ctx)
|
||||
}
|
||||
if c.show != nil {
|
||||
c.show.Start(ctx)
|
||||
}
|
||||
if c.modelList != nil {
|
||||
c.modelList.Start(ctx)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user