Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

URL invalide ? #28

Open
Henrobal opened this issue Mar 28, 2024 · 1 comment
Open

URL invalide ? #28

Henrobal opened this issue Mar 28, 2024 · 1 comment

Comments

@Henrobal
Copy link

Bonjour, ça fait 3h que je suis sur l'installation et j'ai rencontré quelques soucis, mais ce dernier me pose une sacré colle

Dans un premier temps, j'ai ça dans la fenêtre TwitchBot

No history file found
Bot started and listening to channel Henbrobal
Twitch bot listening at http://localhost:3048
The model gpt-3.5-turbo is not available.
NotFoundError: 404 Unknown request URL: GET /V2/models/gpt-3.5-turbo. Please check the URL for typos, or see the docs at https://platform.openai.com/docs/api-reference/.
at APIError.generate (C:\Twitch-Streamer-GPT\node_modules\openai\error.js:53:20)
at OpenAI.makeStatusError (C:\Twitch-Streamer-GPT\node_modules\openai\core.js:263:33)
at OpenAI.makeRequest (C:\Twitch-Streamer-GPT\node_modules\openai\core.js:306:30)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async main (C:\Twitch-Streamer-GPT\twitchBot.js:240:9) {
status: 404,
headers: {
'alt-svc': 'h3=":443"; ma=86400',
'cf-cache-status': 'DYNAMIC',
'cf-ray': '86b554722fb89e61-CDG',
connection: 'keep-alive',
'content-length': '271',
'content-type': 'application/octet-stream',
date: 'Thu, 28 Mar 2024 05:48:12 GMT',
server: 'cloudflare',
'set-cookie': '__cf_bm=zZt.lFgyPvXdZ34zMiIOTDrM_ultKq9UmlKLt2KxrEI-1711604892-1.0.1.1-X21dpjMjJ6QspUiow55GSZ1egkB2i18D1WI95ZnxSwMGQXlhu1Gro1w6HZP4jdS2FFm7KChWEo8UYnNwM0CmQg; path=/; expires=Thu, 28-Mar-24 06:18:12 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None, _cfuvid=CCtZUiYL4LxP7LYpMSB85NIBzy_YZs.ui5ubVLqgHvs-1711604892660-0.0.1.1-604800000; path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None',
'strict-transport-security': 'max-age=15724800; includeSubDomains'
},
error: {
type: 'invalid_request_error',
code: 'unknown_url',
message: 'Unknown request URL: GET /V2/models/gpt-3.5-turbo. Please check the URL for typos, or see the docs at https://platform.openai.com/docs/api-reference/.',
param: null
},
code: 'unknown_url',
param: null,
type: 'invalid_request_error'

Ensuite j'ai ça du côté du Voice Recorder, le fameux Code1, que je n'arrive pas a trouver la solution.

No history file found
Wake word loaded
Using microphone device: Microphone (NVIDIA Broadcast) | Wrong device? Run npm run choose-mic to select the correct input.
Please turn on microphone. Press any key to start 5 seconds of silence for calibration...
Calibrating...
Calibration completed. SILENCE_THRESHOLD set to 3.1176141535194173
Start listening
Wake word detected, start recording !
Playing from C:\Twitch-Streamer-GPT\wake_word_answer: 2.mp3
Audio player exited with code 1
Error details: C:\Twitch-Streamer-GPT\audioPlayer.js:93
throw error;
^

Error: spawn UNKNOWN
at ChildProcess.spawn (node:internal/child_process:421:11)
at spawn (node:child_process:761:9)
at createFFmpeg (C:\Twitch-Streamer-GPT\audioPlayer.js:80:18)
at Object. (C:\Twitch-Streamer-GPT\audioPlayer.js:132:16)
at Module._compile (node:internal/modules/cjs/loader:1369:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1427:10)
at Module.load (node:internal/modules/cjs/loader:1206:32)
at Module._load (node:internal/modules/cjs/loader:1022:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
at node:internal/main/run_main_module:28:49 {
errno: -4094,
code: 'UNKNOWN',
syscall: 'spawn'
}

Node.js v20.12.0

An unhandled rejection occurred!
Reason: Error: Audio player exited with code 1. Details: C:\Twitch-Streamer-GPT\audioPlayer.js:93
throw error;
^

Error: spawn UNKNOWN
at ChildProcess.spawn (node:internal/child_process:421:11)
at spawn (node:child_process:761:9)
at createFFmpeg (C:\Twitch-Streamer-GPT\audioPlayer.js:80:18)
at Object. (C:\Twitch-Streamer-GPT\audioPlayer.js:132:16)
at Module._compile (node:internal/modules/cjs/loader:1369:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1427:10)
at Module.load (node:internal/modules/cjs/loader:1206:32)
at Module._load (node:internal/modules/cjs/loader:1022:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
at node:internal/main/run_main_module:28:49 {
errno: -4094,
code: 'UNKNOWN',
syscall: 'spawn'
}

Node.js v20.12.0

at ChildProcess.<anonymous> (C:\Twitch-Streamer-GPT\modules\voiceHandler.js:178:24)
at ChildProcess.emit (node:events:518:28)
at maybeClose (node:internal/child_process:1105:16)
at Socket.<anonymous> (node:internal/child_process:457:11)
at Socket.emit (node:events:518:28)
at Pipe.<anonymous> (node:net:337:12)

Promise: Promise {
Error: Audio player exited with code 1. Details: C:\Twitch-Streamer-GPT\audioPlayer.js:93
throw error;
^

Error: spawn UNKNOWN
at ChildProcess.spawn (node:internal/child_process:421:11)
at spawn (node:child_process:761:9)
at createFFmpeg (C:\Twitch-Streamer-GPT\audioPlayer.js:80:18)
at Object. (C:\Twitch-Streamer-GPT\audioPlayer.js:132:16)
at Module._compile (node:internal/modules/cjs/loader:1369:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1427:10)
at Module.load (node:internal/modules/cjs/loader:1206:32)
at Module._load (node:internal/modules/cjs/loader:1022:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
at node:internal/main/run_main_module:28:49 {
errno: -4094,
code: 'UNKNOWN',
syscall: 'spawn'
}

Node.js v20.12.0

  at ChildProcess.<anonymous> (C:\Twitch-Streamer-GPT\modules\voiceHandler.js:178:24)
  at ChildProcess.emit (node:events:518:28)
  at maybeClose (node:internal/child_process:1105:16)
  at Socket.<anonymous> (node:internal/child_process:457:11)
  at Socket.emit (node:events:518:28)
  at Pipe.<anonymous> (node:net:337:12)

}
Recording saved to recording.wav file
Transcripting recording
Error during transcription: Error: 404 Unknown request URL: POST /V2/audio/transcriptions. Please check the URL for typos, or see the docs at https://platform.openai.com/docs/api-reference/.
An unhandled rejection occurred!
Reason: AxiosError [AggregateError]
at AxiosError.from (C:\Twitch-Streamer-GPT\node_modules\axios\dist\node\axios.cjs:836:14)
at RedirectableRequest.handleRequestError (C:\Twitch-Streamer-GPT\node_modules\axios\dist\node\axios.cjs:3086:25)
at RedirectableRequest.emit (node:events:518:28)
at eventHandlers. (C:\Twitch-Streamer-GPT\node_modules\follow-redirects\index.js:38:24)
at ClientRequest.emit (node:events:518:28)
at Socket.socketErrorListener (node:_http_client:500:9)
at Socket.emit (node:events:518:28)
at emitErrorNT (node:internal/streams/destroy:169:8)
at emitErrorCloseNT (node:internal/streams/destroy:128:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
at Axios.request (C:\Twitch-Streamer-GPT\node_modules\axios\dist\node\axios.cjs:3876:41)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async startListening (C:\Twitch-Streamer-GPT\voiceRecorder.js:189:21) {
code: 'ECONNREFUSED',
errors: [
Error: connect ECONNREFUSED ::1:3048
at createConnectionError (node:net:1646:14)
at afterConnectMultiple (node:net:1676:16) {
errno: -4078,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '::1',
port: 3048
},
Error: connect ECONNREFUSED 127.0.0.1:3048
at createConnectionError (node:net:1646:14)
at afterConnectMultiple (node:net:1676:16) {
errno: -4078,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 3048
}
],
config: {
transitional: {
silentJSONParsing: true,
forcedJSONParsing: true,
clarifyTimeoutError: false
},
adapter: [ 'xhr', 'http' ],
transformRequest: [ [Function: transformRequest] ],
transformResponse: [ [Function: transformResponse] ],
timeout: 0,
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
maxBodyLength: -1,
env: { FormData: [Function], Blob: [class Blob] },
validateStatus: [Function: validateStatus],
headers: Object [AxiosHeaders] {
Accept: 'application/json, text/plain, /',
'Content-Type': 'application/json',
'User-Agent': 'axios/1.6.8',
'Content-Length': '2',
'Accept-Encoding': 'gzip, compress, deflate, br'
},
method: 'post',
url: 'http://localhost:3048/transcription',
data: '{}'
},
request: <ref *1> Writable {
_events: {
close: undefined,
error: [Function: handleRequestError],
prefinish: undefined,
finish: undefined,
drain: undefined,
response: [Function: handleResponse],
socket: [Function: handleRequestSocket]
},
_writableState: WritableState {
highWaterMark: 16384,
length: 0,
corked: 0,
onwrite: [Function: bound onwrite],
writelen: 0,
bufferedIndex: 0,
pendingcb: 0,
[Symbol(kState)]: 17580812,
[Symbol(kBufferedValue)]: null
},
_maxListeners: undefined,
_options: {
maxRedirects: 21,
maxBodyLength: Infinity,
protocol: 'http:',
path: '/transcription',
method: 'POST',
headers: [Object: null prototype],
agents: [Object],
auth: undefined,
family: undefined,
beforeRedirect: [Function: dispatchBeforeRedirect],
beforeRedirects: [Object],
hostname: 'localhost',
port: '3048',
agent: undefined,
nativeProtocols: [Object],
pathname: '/transcription'
},
_ended: false,
_ending: true,
_redirectCount: 0,
_redirects: [],
_requestBodyLength: 2,
_requestBodyBuffers: [ [Object] ],
_eventsCount: 3,
_onNativeResponse: [Function (anonymous)],
_currentRequest: ClientRequest {
_events: [Object: null prototype],
_eventsCount: 7,
_maxListeners: undefined,
outputData: [],
outputSize: 0,
writable: true,
destroyed: false,
_last: false,
chunkedEncoding: false,
shouldKeepAlive: true,
maxRequestsOnConnectionReached: false,
_defaultKeepAlive: true,
useChunkedEncodingByDefault: true,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
strictContentLength: false,
_contentLength: '2',
_hasBody: true,
_trailer: '',
finished: false,
_headerSent: true,
_closed: false,
socket: [Socket],
_header: 'POST /transcription HTTP/1.1\r\n' +
'Accept: application/json, text/plain, /\r\n' +
'Content-Type: application/json\r\n' +
'User-Agent: axios/1.6.8\r\n' +
'Content-Length: 2\r\n' +
'Accept-Encoding: gzip, compress, deflate, br\r\n' +
'Host: localhost:3048\r\n' +
'Connection: keep-alive\r\n' +
'\r\n',
_keepAliveTimeout: 0,
_onPendingData: [Function: nop],
agent: [Agent],
socketPath: undefined,
method: 'POST',
maxHeaderSize: undefined,
insecureHTTPParser: undefined,
joinDuplicateHeaders: undefined,
path: '/transcription',
_ended: false,
res: null,
aborted: false,
timeoutCb: [Function: emitRequestTimeout],
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
reusedSocket: false,
host: 'localhost',
protocol: 'http:',
_redirectable: [Circular *1],
[Symbol(shapeMode)]: false,
[Symbol(kCapture)]: false,
[Symbol(kBytesWritten)]: 0,
[Symbol(kNeedDrain)]: false,
[Symbol(corked)]: 0,
[Symbol(kOutHeaders)]: [Object: null prototype],
[Symbol(errored)]: null,
[Symbol(kHighWaterMark)]: 16384,
[Symbol(kRejectNonStandardBodyWrites)]: false,
[Symbol(kUniqueHeaders)]: null
},
_currentUrl: 'http://localhost:3048/transcription',
[Symbol(shapeMode)]: true,
[Symbol(kCapture)]: false
},
cause: AggregateError [ECONNREFUSED]:
at internalConnectMultiple (node:net:1116:18)
at afterConnectMultiple (node:net:1683:7) {
code: 'ECONNREFUSED',
[errors]: [ [Error], [Error] ]
}
}
Promise: Promise {
AxiosError [AggregateError]
at AxiosError.from (C:\Twitch-Streamer-GPT\node_modules\axios\dist\node\axios.cjs:836:14)
at RedirectableRequest.handleRequestError (C:\Twitch-Streamer-GPT\node_modules\axios\dist\node\axios.cjs:3086:25)
at RedirectableRequest.emit (node:events:518:28)
at eventHandlers. (C:\Twitch-Streamer-GPT\node_modules\follow-redirects\index.js:38:24)
at ClientRequest.emit (node:events:518:28)
at Socket.socketErrorListener (node:_http_client:500:9)
at Socket.emit (node:events:518:28)
at emitErrorNT (node:internal/streams/destroy:169:8)
at emitErrorCloseNT (node:internal/streams/destroy:128:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
at Axios.request (C:\Twitch-Streamer-GPT\node_modules\axios\dist\node\axios.cjs:3876:41)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async startListening (C:\Twitch-Streamer-GPT\voiceRecorder.js:189:21) {
code: 'ECONNREFUSED',
errors: [ [Error], [Error] ],
config: {
transitional: [Object],
adapter: [Array],
transformRequest: [Array],
transformResponse: [Array],
timeout: 0,
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
maxBodyLength: -1,
env: [Object],
validateStatus: [Function: validateStatus],
headers: [Object [AxiosHeaders]],
method: 'post',
url: 'http://localhost:3048/transcription',
data: '{}'
},
request: Writable {
_events: [Object],
_writableState: [WritableState],
_maxListeners: undefined,
_options: [Object],
_ended: false,
_ending: true,
_redirectCount: 0,
_redirects: [],
_requestBodyLength: 2,
_requestBodyBuffers: [Array],
_eventsCount: 3,
_onNativeResponse: [Function (anonymous)],
_currentRequest: [ClientRequest],
_currentUrl: 'http://localhost:3048/transcription',
[Symbol(shapeMode)]: true,
[Symbol(kCapture)]: false
},
cause: AggregateError [ECONNREFUSED]:
at internalConnectMultiple (node:net:1116:18)
at afterConnectMultiple (node:net:1683:7) {
code: 'ECONNREFUSED',
[errors]: [Array]
}
}
}

Si quelqu'un peut m'aider, ce serait franchement génial. Merci d'avance :)

@Henrobal
Copy link
Author

Henrobal commented Apr 4, 2024

Je me suis penché sur la question, j'ai changé l'emplacement du dossier et j'ai retiré le s des HTTPS qui deviennent donc des HTTP, ça fonctionne presque. Maintenant j'ai une autre erreur.

Error while sending message to OpenAI API
Retrying...
APIConnectionError: Connection error.
at OpenAI.makeRequest (F:\twitch bot\Twitch-Streamer-GPT-main\node_modules\openai\core.js:292:19)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.answerToMessage (F:\twitch bot\Twitch-Streamer-GPT-main\modules\openaiLib.js:165:22) {
status: undefined,
headers: undefined,
error: undefined,
code: undefined,
param: undefined,
type: undefined,
cause: TypeError [ERR_INVALID_PROTOCOL]: Protocol "https:" not supported. Expected "http:"
at new ClientRequest (node:_http_client:183:11)
at request (node:https:379:10)
at F:\twitch bot\Twitch-Streamer-GPT-main\node_modules\node-fetch\lib\index.js:1478:15
at new Promise ()
at fetch (F:\twitch bot\Twitch-Streamer-GPT-main\node_modules\node-fetch\lib\index.js:1447:9)
at ClientRequest. (F:\twitch bot\Twitch-Streamer-GPT-main\node_modules\node-fetch\lib\index.js:1631:15)
at ClientRequest.emit (node:events:530:35)
at HTTPParser.parserOnIncomingClient (node:_http_client:698:27)
at HTTPParser.parserOnHeadersComplete (node:_http_common:119:17)
at Socket.socketOnData (node:_http_client:540:22) {
code: 'ERR_INVALID_PROTOCOL'
}
}
An unhandled rejection occurred!
Reason: Error: Error while sending message to OpenAI API
at Object.answerToMessage (F:\twitch bot\Twitch-Streamer-GPT-main\modules\openaiLib.js:185:15)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Promise: Promise {
Error: Error while sending message to OpenAI API
at Object.answerToMessage (F:\twitch bot\Twitch-Streamer-GPT-main\modules\openaiLib.js:185:15)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Du côté du Voice Recorder j'ai ça :

Please turn on microphone. Press any key to start 5 seconds of silence for calibration...
Calibrating...
Calibration completed. SILENCE_THRESHOLD set to 2.212354937803398
Start listening
Wake word detected, start recording !
Playing from F:\twitch bot\Twitch-Streamer-GPT-main\wake_word_answer: 02.mp3
Recording saved to recording.wav file
Transcripting recording

Error during transcription: Error: Connection error.

Merci pour les personnes qui voudront bien m'aider.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant