"vscode:/vscode.git/clone" did not exist on "19ac86ffb463d6346df64e495f5216259db5897f"
Unverified Commit b226b7b0 authored by Graham King's avatar Graham King Committed by GitHub
Browse files

fix(dynamo-run): Don't exit interactive chat on error (#1155)

Previously any error would cause us to halt. Most of them are recoverable. So now we print the error and return to the prompt.
parent 3e8e38a9
...@@ -122,7 +122,13 @@ async fn main_loop( ...@@ -122,7 +122,13 @@ async fn main_loop(
}; };
// Call the model // Call the model
let mut stream = engine.generate(Context::new(req)).await?; let mut stream = match engine.generate(Context::new(req)).await {
Ok(stream) => stream,
Err(err) => {
tracing::error!(%err, "Request failed.");
continue;
}
};
// Stream the output to stdout // Stream the output to stdout
let mut stdout = std::io::stdout(); let mut stdout = std::io::stdout();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment