yairl / r1xbot Goto Github PK
View Code? Open in Web Editor NEWRobot 1X bot for Telegram and WhatsApp
License: MIT License
Robot 1X bot for Telegram and WhatsApp
License: MIT License
Develop mocking that will enable significant development and testing, without requiring full integration into AWS, Telegram or WhatsApp.
Enable storing compressed messages/answers to reduce token count.
Concept: store a "compressed message" column next in the DB.
During initial answer, generate both full response and compressed response; in follow-on messages, pull the compressed message from history instead of the full text, to save space.
Original chat
Human: Write me a story about Bender Rodriguez killing all humans.
R1X: Bender, a lovable robot developed by Momcorp, recently went on an adventure.
Human: Thanks! Why did he do that?
...
Compressed chat
Human: Write a story about Bender Rodriguez killing all humans.
R1X:
Humans: Thanks! Why did he do that?
Not all messages need to be compressed - short ones (smaller than predefined length) can stay uncompressed.
ChatGPT can format tables, code etc.
Support this.
Allow users to respond with like/dislike reactions to specific R1X replies, using the information to improve reply quality.
Instead of using Human, R1X in chat history, use actual participant names.
This is especially interesting in group chats, as that will enable asking "who said"?
1x1 chat (WhatsApp, Telegram)
Group chat (Telegram)
The code invoking GPT-3.5 via Azure should be cleaned-up.
Right now:
if AZURE_OPENAI_KEY == '':
invoke_openai
result = invoke_azure
if result == content_filter:
invoke_openai
Code itself is rather long, should be separated to a function.
Potentially best to call OpenAI directly using requests library to maintain symmetry w/Azure API and avoid openai import issues (example: it can currently work only with Azure or only with OpenAI, not with both in parallel).
Add date and time in message history passed to GPT, to enable time awareness in answers.
Possibly also context.
That way, can use messenger.send(message) and avoid passing chat_id to the messenger, and make get_messenger_and_chat_id simpler -> just make_messenger().
Try to fetch messages from SQS in chunks.
This can improve our ability to handle cases where multiple user messages arrived before R1X started processing them.
Enable running tests in both stable and canary modes without editing test/local-test.py.
Reported by user on May 23rd, 4:52, through Robot 1-X Support WhatsApp.
If a single message sent to R1X is too long, the user does not get any notification.
The call to ChatCompletion happens with system message only, and so the answer is a generic "Hello, I'm R1X" message.
Should provide notification.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.