Browse Source

feat-safe-fetch-hook-for-stream-detection

master
Serge Shutov 2 weeks ago
parent
commit
1940e8f420
  1. 1
      injected/chat-logger.js

1
injected/chat-logger.js

@ -216,6 +216,7 @@ @@ -216,6 +216,7 @@
})
}
try { var __ofF1 = window.fetch; window.fetch = function (u, o) { try { var __us1 = (typeof u === 'string') ? u : ((u && u.url) ? String(u.url) : ''); if (__us1.indexOf('chat/completion') !== -1) { fetchTotal = fetchTotal + 1 } } catch (e) { } return __ofF1.apply(this, arguments) } } catch (e) { }
var origOpen = XMLHttpRequest.prototype.open
var origSend = XMLHttpRequest.prototype.send
XMLHttpRequest.prototype.open = function (m, u) {

Loading…
Cancel
Save