Commit Graph
8 Commits
Author SHA1 Message Date
marcocosta10000 2323a2d1ab fix(fetch): improve SPA rendering and URL normalization in browser scraper
Increase hydration wait to 5s and scroll the page three times to
trigger lazy-loaded content before extracting text. Prefer body text
when it yields more content than main-content selectors.

Normalize URLs to https and strip the www. prefix for consistent
deduplication, and allow bare domains with no trailing path to match
the extraction pattern.

Also update agent/user profiles with site reputation and price
comparison guidance, and append conversation logs for 2026-10-27.
2026-10-27 20:14:50 -03:00
marcocosta10000 def4568355 fggfg 2026-10-26 17:06:03 -03:00
marcocosta10000 723ca1506b feat(agent): scrape linked pages to ground answers in real content
Adds `_fetch_page_content()`, which downloads a URL with a
browser-like User-Agent and uses BeautifulSoup with the lxml
parser to strip scripts, navigation, and other non-content
markup, returning up to 3000 characters of readable text.

The response validator now also compares generated replies
against this scraped text, flagging named entities and claims
that do not appear in the retrieved page content.

Dependencies: adds beautifulsoup4==4.12.3 and pins lxml==5.3.0
for parser compatibility.
2026-10-26 16:48:29 -03:00
marcocosta10000 9eed02645b feat(search): validate responses against web results
Adds a post-generation validation step that checks whether a
search-grounded reply is actually supported by the retrieved
results: it extracts cited URLs from the response and flags
replies that claim to have searched without citing any of the
provided sources, as well as replies containing specific
numbers or dates absent from the results.

Also switches the default model to xiaomi/mimo-v2.6-flash and
documents the anti-hallucination behavior in the README.
2026-10-26 16:35:20 -03:00
marcocosta10000 4f9d83a451 rerere 2026-10-26 16:13:33 -03:00
marcocosta10000 d7f252034e feat(i18n): add /lang command for preferred conversation language
Introduce a language selection command backed by a supported-language
table and per-language response instructions. The chosen code is stored
as `preferred_language` in the user profile and injected into the system
prompt so replies follow the selected language, with an `auto` option
for detection.

Also refreshes the agent and user profile timestamps and appends the
latest conversation context entries.
2026-10-26 15:35:23 -03:00
marcocosta10000 25288d2c0f feat(voice): transcribe Telegram voice notes with SpeechRecognition
Add a voice message handler that downloads OGG audio, converts it to
WAV via pydub/ffmpeg, and transcribes it with Google Speech Recognition
(pt-BR) before feeding the text into the normal message pipeline.

Also extract shared text processing into process_text_message, guard
against updates without a text attribute, switch the default AI provider
to openrouter with deepseek-v4-flash, and document the ffmpeg system
requirement in DEPLOY.md.
2026-10-25 17:27:42 -03:00
marcocosta10000 6b3b6541a7 feat: add psagentai agent with deployment and configuration
Initial project setup including the main agent script, configuration
files, profile JSON state, systemd service unit, startup script,
deployment documentation, and Python dependencies.

Includes .env, venv/, and __pycache__/ which should likely be
excluded via .gitignore to avoid committing secrets and artifacts.
2026-10-25 17:05:13 -03:00