Capturing Llama.cpp stderr in typescript error #140
-
What's the best way to capture error messages that get printed to stderr from llama.cpp?
But that doesn't get propagated in typescript. Do you have any tips on how to get the llama.cpp error into typescript? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
@samlhuillier There's no straightforward way to get the errors that llama.cpp prints to stderr directly. |
Beta Was this translation helpful? Give feedback.
-
@samlhuillier In version |
Beta Was this translation helpful? Give feedback.
@samlhuillier In version
3.0.0-beta.6
, you can now pass a custom logger to thegetLlama
function to catchllama.cpp
's error logs there instead of using stderr.You can see code examples of this version here, and the parameter you're looking for is
logger
; the TypeScript types for this parameter should guide you on how to use it.