Giter VIP home page Giter VIP logo

Comments (5)

kwikcoins avatar kwikcoins commented on August 23, 2024

I have got the bot somewhat working but it seems when it needs to call gpt it doesnt respond. image

from chatgpt-telegram-bot.

kwikcoins avatar kwikcoins commented on August 23, 2024

some of my logs

Traceback (most recent call last):
File "/home/codespace/.python/current/lib/python3.10/site-packages/telegram/ext/_application.py", line 1104, in process_update
await coroutine
File "/home/codespace/.python/current/lib/python3.10/site-packages/telegram/ext/_handler.py", line 141, in handle_update
return await self.callback(update, context)
File "/workspaces/codespaces-blank/chatgpt-telegram-bot/src/telegram_message_parser.py", line 121, in chat_text
response = self.message_manager.get_response(
File "/workspaces/codespaces-blank/chatgpt-telegram-bot/src/message_manager.py", line 38, in get_response
self.userDict[id].update(t, message, "user")
File "/workspaces/codespaces-blank/chatgpt-telegram-bot/src/chat_session.py", line 34, in update
if (source == "user") and (contactTime - self.__latestTime > ConfigLoader.get("wait_time")) :
TypeError: '>' not supported between instances of 'float' and 'str'
2023-04-24 06:30:07,229 - TelegramMessageParser - INFO - Get a chat message from user: 1482109310
2023-04-24 06:30:07,635 - telegram.ext._application - ERROR - No error handlers are registered, logging exception.
Traceback (most recent call last):
File "/home/codespace/.python/current/lib/python3.10/site-packages/telegram/ext/_application.py", line 1104, in process_update
await coroutine
File "/home/codespace/.python/current/lib/python3.10/site-packages/telegram/ext/_handler.py", line 141, in handle_update
return await self.callback(update, context)
File "/workspaces/codespaces-blank/chatgpt-telegram-bot/src/telegram_message_parser.py", line 121, in chat_text
response = self.message_manager.get_response(
File "/workspaces/codespaces-blank/chatgpt-telegram-bot/src/message_manager.py", line 38, in get_response
self.userDict[id].update(t, message, "user")
File "/workspaces/codespaces-blank/chatgpt-telegram-bot/src/chat_session.py", line 34, in update
if (source == "user") and (contactTime - self.__latestTime > ConfigLoader.get("wait_time")) :
TypeError: '>' not supported between instances of 'float' and 'str'

from chatgpt-telegram-bot.

flynnoct avatar flynnoct commented on August 23, 2024

@DSwutang Check this

from chatgpt-telegram-bot.

DSwutang avatar DSwutang commented on August 23, 2024

It seems that the issue is caused by the wait_time field in config.json being filled with a string. We currently do not have an automatic check for config types.
You can modify the relevant part of the config field to the following content:
...
"enable_voice": true,
"wait_time": 600,
"enable_dalle": true,
...
The value filled after wait_time should be an integer or a float, adding quotes may cause it to be identified as a string, which could be the cause of the problem you encountered.

from chatgpt-telegram-bot.

flynnoct avatar flynnoct commented on August 23, 2024

@DSwutang answer will solve your problem.

from chatgpt-telegram-bot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.