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.
This commit is contained in:
BIN
Binary file not shown.
@@ -20,21 +20,21 @@ extern "C" {
|
||||
*
|
||||
* the version string like "1.2.3"
|
||||
*/
|
||||
#define LIBXSLT_DOTTED_VERSION "1.1.43"
|
||||
#define LIBXSLT_DOTTED_VERSION "1.1.42"
|
||||
|
||||
/**
|
||||
* LIBXSLT_VERSION:
|
||||
*
|
||||
* the version number: 1.2.3 value is 10203
|
||||
*/
|
||||
#define LIBXSLT_VERSION 10143
|
||||
#define LIBXSLT_VERSION 10142
|
||||
|
||||
/**
|
||||
* LIBXSLT_VERSION_STRING:
|
||||
*
|
||||
* the version number string, 1.2.3 value is "10203"
|
||||
*/
|
||||
#define LIBXSLT_VERSION_STRING "10143"
|
||||
#define LIBXSLT_VERSION_STRING "10142"
|
||||
|
||||
/**
|
||||
* LIBXSLT_VERSION_EXTRA:
|
||||
@@ -50,7 +50,7 @@ extern "C" {
|
||||
* is insignifiant and being able to run xsltpoc -v is useful. On
|
||||
* by default unless --without-debug is passed to configure
|
||||
*/
|
||||
#if 0
|
||||
#if 1
|
||||
#define WITH_XSLT_DEBUG
|
||||
#endif
|
||||
|
||||
@@ -83,7 +83,7 @@ extern "C" {
|
||||
* is insignifiant.
|
||||
* On by default unless --without-debugger is passed to configure
|
||||
*/
|
||||
#if 0
|
||||
#if 1
|
||||
#ifndef WITH_DEBUGGER
|
||||
#define WITH_DEBUGGER
|
||||
#endif
|
||||
@@ -112,7 +112,7 @@ extern "C" {
|
||||
#ifndef WITH_MODULES
|
||||
#define WITH_MODULES
|
||||
#endif
|
||||
#define LIBXSLT_DEFAULT_PLUGINS_PATH() ""
|
||||
#define LIBXSLT_DEFAULT_PLUGINS_PATH() "/project/build/tmp/libxml2/lib/libxslt-plugins"
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user