fix(confidence-engine): preserve successful chat detection
This commit is contained in:
+4
-4
@@ -84,13 +84,13 @@ async function detectChatSupport(baseUrl, modelName) {
|
||||
});
|
||||
|
||||
if (res.ok) {
|
||||
await res.body?.consume();
|
||||
await res.text();
|
||||
_chatSupported = true;
|
||||
} else if (res.status === 405 || res.status === 501) {
|
||||
await res.body?.consume();
|
||||
await res.text();
|
||||
_chatSupported = false;
|
||||
} else {
|
||||
await res.body?.consume();
|
||||
await res.text();
|
||||
_chatSupported = false;
|
||||
}
|
||||
} catch {
|
||||
@@ -160,7 +160,7 @@ class OllamaLlmProvider {
|
||||
: JSON.stringify(fullResponseData.message?.content ?? null);
|
||||
apiUsed = "/api/chat";
|
||||
} else {
|
||||
await res.body?.consume();
|
||||
await res.text();
|
||||
}
|
||||
} catch (e) {
|
||||
if (!e.message.includes("abort")) { /* non-fatal */ }
|
||||
|
||||
Reference in New Issue
Block a user