mirror of
https://github.com/mudler/LocalAI.git
synced 2026-04-04 23:14:41 -04:00
feat(ui): Per model backend logs and various fixes (#9028)
* feat(gallery): Switch to expandable box instead of pop-over and display model files Signed-off-by: Richard Palethorpe <io@richiejp.com> * feat(ui, backends): Add individual backend logging Signed-off-by: Richard Palethorpe <io@richiejp.com> * fix(ui): Set the context settings from the model config Signed-off-by: Richard Palethorpe <io@richiejp.com> --------- Signed-off-by: Richard Palethorpe <io@richiejp.com>
This commit is contained in:
committed by
GitHub
parent
eef808d921
commit
35d509d8e7
@@ -159,19 +159,27 @@ func (ml *ModelLoader) startProcess(grpcProcess, id string, serverAddress string
|
||||
go func() {
|
||||
t, err := tail.TailFile(grpcControlProcess.StderrPath(), tail.Config{Follow: true})
|
||||
if err != nil {
|
||||
xlog.Debug("Could not tail stderr")
|
||||
xlog.Error("Could not tail stderr", "process", grpcProcess)
|
||||
return
|
||||
}
|
||||
for line := range t.Lines {
|
||||
xlog.Debug("GRPC stderr", "id", strings.Join([]string{id, serverAddress}, "-"), "line", line.Text)
|
||||
if ml.backendLogs != nil && ml.backendLoggingEnabled.Load() {
|
||||
ml.backendLogs.AppendLine(id, "stderr", line.Text)
|
||||
}
|
||||
}
|
||||
}()
|
||||
go func() {
|
||||
t, err := tail.TailFile(grpcControlProcess.StdoutPath(), tail.Config{Follow: true})
|
||||
if err != nil {
|
||||
xlog.Debug("Could not tail stdout")
|
||||
xlog.Error("Could not tail stdout", "process", grpcProcess)
|
||||
return
|
||||
}
|
||||
for line := range t.Lines {
|
||||
xlog.Debug("GRPC stdout", "id", strings.Join([]string{id, serverAddress}, "-"), "line", line.Text)
|
||||
if ml.backendLogs != nil && ml.backendLoggingEnabled.Load() {
|
||||
ml.backendLogs.AppendLine(id, "stdout", line.Text)
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user