瀏覽代碼

ollamarunner: Don't panic for unimplemented features at runtime.

It's ok to fail on startup but we shouldn't panic during runtime
based on user input. Downgrade the panic to a warning.
Jesse Gross 1 月之前
父節點
當前提交
4614fafae0
共有 1 個文件被更改,包括 3 次插入4 次删除
  1. 3 4
      runner/ollamarunner/runner.go

+ 3 - 4
runner/ollamarunner/runner.go

@@ -436,10 +436,9 @@ func (s *Server) processBatch() error {
 		// if done processing the prompt, generate an embedding and return
 		if seq.embeddingOnly {
 			// TODO(jessegross): Embedding support
-			// s.removeSequence(i, "")
-			// continue
-
-			panic("generation of embedding outputs not yet supported")
+			slog.Warn("generation of embedding outputs not yet supported")
+			s.removeSequence(i, "")
+			continue
 		}
 
 		// sample a token