Closed schopenhauer closed 1 year ago
what method did you use to generate the token, was having issue when i graphically set with element vs the api route
I followed the instructions to create new API key as described in the comments:
# Obtain a new API key from https://platform.openai.com/account/api-keys
Do this ...
Login with your Matrix Account for the Bot in your favourite Browser, if needed complete your encryption settings
Copy the Access Token in Settings -> Help and Info -> Acess Token
IMPORTANT: DO NOT LOGOUT -> LET THE BROWSER WINDOW OPEN!
Import this Token in your vars.yml
Execute the Ansible Skript with setup-all Option, after this execute with the start Option if nothing in setup-all fails
For simple Debugging create a new Room and invite your bot
If it works then 👋 Hello, I'm ChatGPT bot! Matrix E2EE: true appears
Try !chatgpt Your_Question
If it works close the Browser Window opened in 1.
Hope that helps ...
If this works steps 1-4 it could be necessary to do again if you receive a new Chatgpt Docker Image (IMHO).
Ok, finally got it to work and give me the Hello message. Now, there seems to be another issue:
eb 17 11:39:45 matrix-bot-chatgpt[409349]: Fri, 17 Feb 2023 10:39:45 GMT [INFO] [index] Starting bot using ChatGPT model: text-chat-davinci-002-20221122
Feb 17 11:39:45 matrix-bot-chatgpt[409349]: Fri, 17 Feb 2023 10:39:45 GMT [INFO] [index] Using promptPrefix: <|im_sep|>Instructions:
Feb 17 11:39:45 matrix-bot-chatgpt[409349]: You are ChatGPT, a large language model trained by OpenAI.
Feb 17 11:39:45 matrix-bot-chatgpt[409349]: Current date: February 17, 2023<|im_sep|>
Feb 17 11:39:45 matrix-bot-chatgpt[409349]: Fri, 17 Feb 2023 10:39:45 GMT [ERROR] [MatrixHttpClient] (REQ-5) { errcode: 'M_NOT_FOUND', error: 'Event not found.' }
Feb 17 11:39:45 matrix-bot-chatgpt[409349]: Fri, 17 Feb 2023 10:39:45 GMT [INFO] [MatrixClientLite] End-to-end encryption enabled
Feb 17 11:39:45 matrix-bot-chatgpt[409349]: Fri, 17 Feb 2023 10:39:45 GMT [INFO] [index] Bot started!
Feb 17 11:39:46 matrix-bot-chatgpt[409349]: Fri, 17 Feb 2023 10:39:46 GMT [ERROR] [MatrixHttpClient] (REQ-8) { errcode: 'M_NOT_FOUND', error: 'Event not found.' }
Feb 17 11:40:27 matrix-bot-chatgpt[409349]: Fri, 17 Feb 2023 10:40:27 GMT [ERROR] [OpenAI-API Error: Error: Failed to send message. HTTP 404 - {
Feb 17 11:40:27 matrix-bot-chatgpt[409349]: "error": {
Feb 17 11:40:27 matrix-bot-chatgpt[409349]: "message": "That model does not exist",
Feb 17 11:40:27 matrix-bot-chatgpt[409349]: "type": "invalid_request_error",
Feb 17 11:40:27 matrix-bot-chatgpt[409349]: "param": null,
Feb 17 11:40:27 matrix-bot-chatgpt[409349]: "code": null
Feb 17 11:40:27 matrix-bot-chatgpt[409349]: }
Feb 17 11:40:27 matrix-bot-chatgpt[409349]: }
Feb 17 11:40:27 matrix-bot-chatgpt[409349]: ]
Feb 17 11:40:27 matrix-bot-chatgpt[409349]: TypeError: Cannot read properties of undefined (reading 'response')
Feb 17 11:40:27 matrix-bot-chatgpt[409349]: at CommandHandler.onMessage (file:///usr/src/app/dist/handlers.js:128:86)
Feb 17 11:40:27 matrix-bot-chatgpt[409349]: at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Feb 17 11:40:27 matrix-bot-chatgpt[409349]: Fri, 17 Feb 2023 10:40:27 GMT [ERROR] [MatrixHttpClient] (REQ-23) { errcode: 'M_NOT_FOUND', error: 'Event not found.' }
This works for me. Seems to me you do not have the last line.
Quick an Dirty way is to change the file in your matrix Directory /chatgpt/config/env and restart the service file with systemctl. But dont forget to change the vars.yml.
Ok, this works well - thank you :+1:
Can you close the issue please, since the problem is now fixed.
I am getting the following error message when trying to deploy the
matrix-bot-chatgpt
, but the bot user and API key configured invars.yml
seem to be in good order. Any ideas?