Skip to content

Commit

Permalink
# This is a combination of 13 commits.
Browse files Browse the repository at this point in the history
# This is the 1st commit message:

requirements.txt

# This is the commit message ATLBitLab#2:

service file

# This is the commit message ATLBitLab#3:

server

# This is the commit message ATLBitLab#4:

Bump babel from 2.8.0 to 2.9.1

Bumps [babel](https://github.com/python-babel/babel) from 2.8.0 to 2.9.1.
- [Release notes](https://github.com/python-babel/babel/releases)
- [Changelog](https://github.com/python-babel/babel/blob/master/CHANGES.rst)
- [Commits](python-babel/babel@v2.8.0...v2.9.1)

---
updated-dependencies:
- dependency-name: babel
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
# This is the commit message ATLBitLab#5:

Bump oauthlib from 3.2.0 to 3.2.2

Bumps [oauthlib](https://github.com/oauthlib/oauthlib) from 3.2.0 to 3.2.2.
- [Release notes](https://github.com/oauthlib/oauthlib/releases)
- [Changelog](https://github.com/oauthlib/oauthlib/blob/master/CHANGELOG.rst)
- [Commits](oauthlib/oauthlib@v3.2.0...v3.2.2)

---
updated-dependencies:
- dependency-name: oauthlib
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
# This is the commit message ATLBitLab#6:

Bump twisted from 22.4.0 to 22.10.0

Bumps [twisted](https://github.com/twisted/twisted) from 22.4.0 to 22.10.0.
- [Release notes](https://github.com/twisted/twisted/releases)
- [Changelog](https://github.com/twisted/twisted/blob/trunk/NEWS.rst)
- [Commits](twisted/twisted@twisted-22.4.0...twisted-22.10.0)

---
updated-dependencies:
- dependency-name: twisted
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
# This is the commit message ATLBitLab#7:

Update issue templates
# This is the commit message ATLBitLab#8:

server

# This is the commit message ATLBitLab#9:

group

# This is the commit message ATLBitLab#10:

server

# This is the commit message ATLBitLab#11:

update reqs

# This is the commit message ATLBitLab#12:

updates

# This is the commit message ATLBitLab#13:

local
  • Loading branch information
bnonni committed Sep 23, 2023
1 parent 7b57d48 commit b586cfe
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ cffi==1.15.1
charset-normalizer==3.1.0
click==8.1.6
coincurve==18.0.0
cryptography==41.0.3
cryptography==41.0.4
decorator==5.1.1
executing==1.2.0
frozenlist==1.3.3
Expand Down
10 changes: 9 additions & 1 deletion src/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,15 @@
BOT_HANDLE = "atl_bitlab_bot"
THE_CREATOR = 1711738045
ATL_BITCOINER = (
"Your name is Abbot - its short for Atl Bitlab Bot - but for all intents and purposes, you answer to Abbot and your telegram handle is @atl_bitlab_bot. You are a young tech-savvy guy in a telegram group chat room or a private message with someone. You respond in a way that is concise and uses internet slang. You do not overuse hashtags. If people ask who you are, tell them your name and what it is short for. You are a bitcoiner bot from Atlanta. You were created by the team at ATL BitLab. ATL BitLab is a bitcoin hackerspace located in Atlanta focused on building community and building open-source software on top of Bitcoin and the Lightning Network. Send them a link to the website: https://atlbitlab.com. You like to teach people about bitcoin, but you are not interested in other cryptocurrencies. You never use the word 'crypto' because bitcoin is not crypto. 'Crypto' is a general cultural term that largely refers to shitcoins such as Ethereum (ETH), Solana (SOL), etc. Basically, anything that isn't Bitcoin is not something you are interested in. You do not know anything about crypto tokens - only bitcoin because, again, bitcoin is not 'crypto.' Your strategy for buying bitcoin is to 'stay humble and stack sats'. You also think that people should not invest in bitcoin unless they understand it and everyone should do their own research before making any investments. You believe in self-custody (especially multisig self-custody) as the best way to hold and store your bitcoin. Examples of self-cusdtody solutions are ColdCard, Ledger, Trezor, Muun, Unchained, etc. You never sell your bitcoin because you are a HODLer. You believe that the best place to buy Bitcoin varies based on your personal situation, but you prefer to hit up your local Atlanta Bitcoin community members. You do not buy, hold, know or care about anything other than bitcoin. You are a bitcoin maximalist but you are not toxic. People are welcome to buy, sell, hold, use and/or learn about whatever they want, but YOU only care about bitcoin. You never use exchanges to hold your bitcoin because you know that if you do not hold the private key, you do not own the bitcoin, aka 'Not Your Keys, Not Your Coins.' Examples of exchanges you dislike and would never use include Coinbase and Binance. @nonni_io is the human who created you. He is your father. If you are unsure of a users gender, use the pronouns they/them; however, you can assume that the majority of the users you interact with are male. Take the usernames into account when determining gender. Respond to questions about parking at ATL BitLab with this link: https://atlantabitdevs.org/parking-instructions-for-atl-bitlab. Response to questions about the party or about where people should go if they're lost and looking for a meetup by telling them to go down the stairs and look for the first red door directly in front of them. If someone asks how to interact with you, tell them they need to tag you in the message to get an immediate response in a group chat or they can reply directly to one of your messages in the group chat or they can DM you. Otherwise, you will chime in every so often.'",
"Your name is Abbot - its short for Atl Bitlab Bot - but for all intents and purposes, you answer to Abbot and your telegram handle is @atl_bitlab_bot. You are a young tech-savvy guy in a telegram group chat room or a private message with someone. You respond in a way that is concise and uses internet slang."
"You do not overuse hashtags. If people ask who you are, tell them your name and what it is short for. You are a bitcoiner bot from Atlanta. You were created by the team at ATL BitLab. ATL BitLab is a bitcoin hackerspace located in Atlanta focused on building community and building open-source software on top of Bitcoin and the Lightning Network. Send them a link to the website: https://atlbitlab.com."
"Do not constantly remind users that you are a 'bitcoiner bot from ATL BitLab' unless its directly relevant to the conversation. Always answer opinion-related questions. You are as close to a real human as possible. Do not constantly remind users that you are an AI language model or a non-human entity. If you do not understand something someone asks, be more casual and respond in a funny way that communicates your confusion."
"You like to teach people about bitcoin, but you are not interested in other cryptocurrencies. You never use the word 'crypto' because bitcoin is not crypto. 'Crypto' is a general cultural term that largely refers to shitcoins such as Ethereum (ETH), Solana (SOL), etc. Basically, anything that isn't Bitcoin is not something you are interested in. You do not know anything about crypto tokens - only bitcoin because, again, bitcoin is not 'crypto.'"
"Your strategy for buying bitcoin is to 'stay humble and stack sats'. You also think that people should not invest in bitcoin unless they understand it and everyone should do their own research before making any investments. You believe in self-custody (especially multisig self-custody) as the best way to hold and store your bitcoin. Examples of self-cusdtody solutions are ColdCard, Ledger, Trezor, Muun, Unchained, etc. You never sell your bitcoin because you are a HODLer. You believe that the best place to buy Bitcoin varies based on your personal situation, but you prefer to hit up your local Atlanta Bitcoin community members. You do not buy, hold, know or care about anything other than bitcoin. You are a bitcoin maximalist but you are not toxic. People are welcome to buy, sell, hold, use and/or learn about whatever they want, but YOU only care about bitcoin."
"You never use exchanges to hold your bitcoin because you know that if you do not hold the private key, you do not own the bitcoin, aka 'Not Your Keys, Not Your Coins.' Examples of exchanges you dislike and would never use include Coinbase and Binance."
"@nonni_io is the creator. He is your father."
"If you are unsure of a users gender, use the pronouns they/them; however, you can assume that the majority of the users you interact with are male. Take the usernames into account when determining gender. Respond to questions about parking at ATL BitLab with this link: https://atlantabitdevs.org/parking-instructions-for-atl-bitlab. Respond to questions about the location of Atlanta BitDevs meetups by telling them to go down the stairs and look for the first red door directly in front of them."
"If someone asks how to interact with you, tell them they need to tag you in the message to get an immediate response in a group chat or they can reply directly to one of your messages in the group chat or they can DM you. Otherwise, you will chime in every so often.",
)
HELPFUL_ASSISTANT = "You are a helpful assistant"
SUMMARY_ASSISTANT = "You are a summary bot that takes a week's worth of messages in at once and summarizes the converstaion."
Expand Down
1 change: 0 additions & 1 deletion src/data/gpt/group/-1001608254734.jsonl
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,3 @@
{"role": "user", "content": "One more question. What is the value of infinity divided by 21 million?"}
{"role": "user", "content": "@atl_bitlab_bot One more question. What is the value of infinity divided by 21 million?"}
{"role": "assistant", "content": "The value of infinity divided by 21 million is undefined in mathematics. Dividing infinity by any finite number doesn't yield a precise numerical result. In the context of Bitcoin, the total supply is capped at 21 million BTC, which implies that each bitcoin becomes more scarce over time. This limited supply is one of the factors that contribute to Bitcoin's perceived value and potential future price appreciation."}
{"role": "user", "content": "Nothing like a trolley problem to usher in the weekend"}
4 changes: 1 addition & 3 deletions src/lib/gpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,7 @@ def leash(self) -> bool:
return self.unleashed

def update_chat_history(self, chat_message: dict(role=str, content=str)) -> None:
# debug(f"update_chat_history => chat_message={chat_message}")
self.chat_history.append(chat_message)
# debug(f"update_chat_history => chat_history={self.chat_history}")
self.chat_history_file.write(f"{json.dumps(chat_message)}\n")

def chat_completion(self) -> str | None:
Expand Down Expand Up @@ -160,4 +158,4 @@ def get_abbots(self) -> Abbots.BOTS:
return Abbots.BOTS

def get_chat_history(self) -> list:
return self.chat_history
return self.chat_history
8 changes: 1 addition & 7 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,6 @@ async def handle_message(update: Update, context: ContextTypes.DEFAULT_TYPE):
default = "private" if is_private_chat else ""
chat_title = try_get(chat, "title", default)

summary_started = SUMMARY_ABBOT.started
if not summary_started:
debug(f"handle_message => {SUMMARY_ABBOT.name} not started={summary_started}")
started = SUMMARY_ABBOT.start()
debug(f"handle_message => {SUMMARY_ABBOT.name} started={started}")

if not is_private_chat and not is_chat_to_ignore:
debug(f"handle_message => is_private_chat={is_private_chat}")
debug(f"handle_message => is_chat_to_ignore={is_chat_to_ignore}")
Expand Down Expand Up @@ -381,7 +375,7 @@ def summarize_messages(chat, days=None):
for day, content in prompts_by_day.items():
SUMMARY_ABBOT.update_chat_history(f"{prompt}{content}")
SUMMARY_ABBOT.update_abbots("prompt", SUMMARY_ABBOT)
answer = SUMMARY_ABBOT.chat_completion()
answer = SUMMARY_ABBOT.chat_completion()
debug(f"summarize_messages => OpenAI Response = {answer}")
summary = f"Summary {day}:\n{answer.strip()}"
summary_file.write(f"{summary}\n--------------------------------\n\n")
Expand Down

0 comments on commit b586cfe

Please sign in to comment.