Comments (5)
I have got the bot somewhat working but it seems when it needs to call gpt it doesnt respond.
from chatgpt-telegram-bot.
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.
@DSwutang Check this
from chatgpt-telegram-bot.
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.
@DSwutang answer will solve your problem.
from chatgpt-telegram-bot.
Related Issues (20)
- Add TTS feature to reply voice messages with Amazon Polly HOT 6
- Add logging config
- Add logging config
- Please Make Deployable On Replit HOT 1
- how to use voice?
- how to use inline mode? HOT 2
- Settings HOT 2
- Add the ability to change the role please HOT 1
- •́ ‿ ,•̀
- how to get working HOT 6
- v1.2.2 to v1.3.0. Backward compatibility HOT 3
- Azure TTS, Enhanced Logging and Better Structured Config HOT 1
- Update readme to v1.4.0
- Handle messages concurrently
- Single Message Mode
- How to run a bot so that it responds with an audio message?
- Could I get the bot work with Azure OpenAI Service by any chance?
- Oops, something went wrong with OpenAI. Please try again later.
- Add continue_chat command
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chatgpt-telegram-bot.