From 0384397e28e22b6cbb2f12fc08cdf382ec8900ce Mon Sep 17 00:00:00 2001 From: "Frederico @ VilaRosa02" Date: Fri, 29 Aug 2025 19:31:26 +0000 Subject: [PATCH] fixed bug --- .gitmodules | 4 ++-- make-telegram-updates | 1 - process-telegram-updates | 1 + src/Makefile | 15 +++++++++++++++ 4 files changed, 18 insertions(+), 3 deletions(-) delete mode 160000 make-telegram-updates create mode 160000 process-telegram-updates diff --git a/.gitmodules b/.gitmodules index 9830419..6fd0f0e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ [submodule "make-llm-files"] path = make-llm-files url = https://git.fredericofalcao.com/git/make-llm-files -[submodule "make-telegram-updates"] - path = make-telegram-updates +[submodule "process-telegram-updates"] + path = process-telegram-updates url = https://git.fredericofalcao.com/git/make-telegram-updates diff --git a/make-telegram-updates b/make-telegram-updates deleted file mode 160000 index b6b01b4..0000000 --- a/make-telegram-updates +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b6b01b48dc01a41db14066196fe3d379560d67f0 diff --git a/process-telegram-updates b/process-telegram-updates new file mode 160000 index 0000000..5c6601d --- /dev/null +++ b/process-telegram-updates @@ -0,0 +1 @@ +Subproject commit 5c6601d7ec86c3e0baf4c1e6341830e8e66d84f7 diff --git a/src/Makefile b/src/Makefile index 1250795..cfb4bc9 100644 --- a/src/Makefile +++ b/src/Makefile @@ -16,6 +16,19 @@ SRC_FILES=$(subst .score.txt,.notification.txt,$(SRC_SCORE_FILES)) all: $(SRC_FILES) +# 7. Processed received messages +process-telegram-updates: ../process-telegram-updates/process_message.php + cd ../process-telegram-updates && make fetch_updates + cd ../process-telegram-updates && make process_updates + +../process-telegram-updates/process_message.php: + printf '%s\n' \ + ' $@ + + # 6. Run the MAIL-ROUTE script to either notify the user of a new message, or ignore %.notification.txt: %.score.txt %.header.txt %.summary.txt TELEGRAM_BOT_TOKEN=$(TELEGRAM_BOT_TOKEN) TELEGRAM_CHAT_ID=$(TELEGRAM_CHAT_ID) ./mail-route $^ > $@ @@ -32,6 +45,7 @@ all: $(SRC_FILES) %.summary.txt: %.email.txt cd ../make-llm-files && make clean echo "You are a machine executive assistant tasked with parsing emails. User will send the content of a received email, and you (agent) must send a one phrase (max 12 words) sentence as an executive summary of the email." > ../make-llm-files/01_root.sys + cp ../process-telegram-updates/data/learnings.txt ../make-llm-files/02_learnings.sys cp ../data/$< ../make-llm-files/user_message.txt echo '{}' > ../make-llm-files/settings.json cd ../make-llm-files && make @@ -43,6 +57,7 @@ all: $(SRC_FILES) %.score.txt: %.email.txt cd ../make-llm-files && make clean echo "You are a machine executive assistant tasked with parsing emails urgency/importance. User will send the content of a received email, and you (agent) must REPLY ONLY with a single score [0.00-1.00] where you assess how important/urgent the email is." > ../make-llm-files/01_root.sys + cp process-telegram-updates/data/learnings.txt ../make-llm-files/02_learnings.sys cp ../data/$< ../make-llm-files/user_message.txt echo '{"temperature": 0.8,"max_output_tokens":4}' > ../make-llm-files/settings.json cd ../make-llm-files && make