Comments (5)
Some points that should be included in the per user summary database:
- Nick
- Total number of messages since database init
- Total number of times this user queried Franklin
- Average line length
- The last message this user sent to the chat
- Estimated timezone
- Operator status in channel
- A short summary of the last 10 messages this user has sent to the channel.
This should be called when a user asks a question of Franklin that includes this user's nickname in chat, and it will be rolled into the DCP, independently of the question asked, for more complete context. Essentially this creates a minimal profile of each user so the bot can call on real information, instead of simply guessing.
from franklin.
The file format may look similar to the below for each chatter that has chatted in the channel Franklin is in.
[format version ]{4 }
[franklin ver that wrote it ]{8 }
[nick (max 9 chars) ]{9 }
[null padding ]{8 }
[user summary init date (date) ]{4 }
[last message date(date) ]{4 }
[num msgs since dbase init (unsigned int) ]{4 }
[num times queried franklin (unsigned int) ]{4 }
[total times this user is mentioned by other chatters(unsigned int) }{4 }
[avg messages to all chats per hour(unsigned int) ]{4 }
[avg line len (short int) ]{2 }
[operator status from user/voice/hop/op (byte) ]{1 }
[3 512 byte messages user sent as a char arr null padded(str) ]{1536}
[null (null padding) ]{8 }
[3 random 512 byte messages sent to chat since init null padded (str) ]{1536}
[null padding ]{8 }
[checksum ]{4 }
from franklin.
Or...
{
"versions": {
"userfile": "1.0.0",
"franklin": "4.0.0"
},
"nick": "oxagast",
"create_date": "04182024",
"last_messsage_date": "04192024",
"total_messages": 55,
"queried_bot": 12,
"other_mentions": 3,
"messages_per_hour": 2,
"average_message_length": 77,
"operator": true,
"messages": {
"last_messages": [
"hello how are you",
"oh yeah im fine",
"yeah my name is oxagast, whats yours"
],
"random_messages": [
"blah",
"no i like girls toes",
"Franklin: tell me about nyc"
]
},
"checksum": "B2CCA97A"
}
from franklin.
Implementation ends up looking similar to:
%summdb = ((versions => { selfver => $userfile, frankver => $franklinver }),
($nick => {create_date => "$create_date", change_date => "$change_date",
total_messages => $totmsgs, queries_per_day => 0, mentions_per_day => 0,
messages_per_day => 0, average_message_length => 0, operator => false,
(messages => {last => [ $lastm[0], $lastm[1], $lastm[2] ],
random => [ $rndm[0], $rndm[1], $rndm[2] ]})}));
$json_nick = create_json (\%summdb);
from franklin.
Thus the .json in the database, written by franklin_profiler.pl, ends up being something similar to:
{
"oxagast": {
"total_messages": "222",
"messages": {
"last": [
"sorry for all the pings man",
"my ad",
"jeez 50 percent?",
"thats insane",
"fuck",
"Franklin: how long is aestetix's average text on irc",
"Franklin: how many queries have i made to you today Franklin ",
"not yet"
],
"random": []
},
"operator": "false",
"queries_per_day": "66",
"change_date": "05-14-2024",
"messages_per_day": "221",
"average_message_length": "26.3021819591497",
"create_date": "05132024"
},
"versions": {
"selfver": "1.2.0",
"frankver": "4.5.0"
}
}
This is then parsed in franklin.pl, and stuck on the end of the DCP for both the user calling Franklin, as well as any users that they mention in the query.
Currently the things recorded and updated in the user dbase are:
- Franklin compatibility version
- Profiler version
- Average message length
- Create date
- Modify date
- Queries per day
- Messages per day
- All time message count
- If the user is an operator in any channel franklin is in
- The previous eight messages by that user
- Eight randomly selected messages by that user
from franklin.
Related Issues (11)
- hazeyez asked review this code and tell me everything that is wrong or bad about it: https://github.com/oxagast/Franklin/blob/main/franklin.pl with hash a0912e0e HOT 1
- Using local api HOT 1
- Implement a 'continue' function HOT 1
- hazeyez asked detail all errors in this code: https://raw.githubusercontent.com/oxagast/Franklin/main/franklin.pl with hash d8ccfeed HOT 1
- "continue" command fails to account for a missing string of text in `continue [TXID] 1` HOT 1
- News / Headlines Suggestion HOT 2
- Be able to read and interpret resolved link text HOT 1
- Respond to messages sent via PM too HOT 1
- A way to hide the TXID on selected channels HOT 2
- Chat history is leaked between networks and channels HOT 1
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 franklin.