From 4614fafae0ee58af5b9d04ec4b8c2eb3846274da Mon Sep 17 00:00:00 2001 From: Jesse Gross Date: Sat, 8 Mar 2025 18:48:32 -0800 Subject: [PATCH] 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. --- runner/ollamarunner/runner.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/runner/ollamarunner/runner.go b/runner/ollamarunner/runner.go index d9f479708..a51b1459e 100644 --- a/runner/ollamarunner/runner.go +++ b/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