vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   TalkerBot Add-on - Learning System (https://vborg.vbsupport.ru/showthread.php?t=60429)

mikeee 04-21-2004 03:08 AM

Quote:

Originally Posted by mikeee
Can someone help? I keep getting this error:
=========================
Loading learnwhat.xml
Loading data aiml file: http://www.MYSITE.com/external.php?type=AIML
XML error: syntax error at line 1

Sorry to bump this again but I really can use some help. Anyone have any clue what this error means?

InsaneContender 05-12-2004 04:14 AM

It looks like you edited the file incorrectly.

InsaneContender 05-12-2004 04:20 AM

I am as well having difficulties though.

I did all the file edits and everything correctly (I checked maybe 30 times)

and I am doing this off a fresh install (I only want him to learn what we teach 'em)

It says it loads everything, in the learner; the posts get moved - yet he still responds with his universal error message...

Is there anything I might have done wrong?

Database is clean too... hmmm...

InsaneContender 05-16-2004 03:51 AM

*bump*

Geographic2 08-22-2004 07:12 PM

Quote:

Can someone help? I keep getting this error:
=========================
Loading learnwhat.xml
Loading data aiml file: http://www.MYSITE.com/external.php?type=AIML
XML error: syntax error at line 1
It means there is a problem with the AIML feed...


when you put http://www.MYSITE.com/external.php?type=AIML in your browser, what do you get for output?
It would help if you cut and pasted that output here...

It's probably something wrong with external.php, check your modifications there.

Or you are missing your stylevar charset... try changing the line above:
echo '<aiml version="1.0">';

to:
echo '<?xml version="1.0" encoding="ISO-8859-1"?>' . "\r\n";




Quote:

It says it loads everything, in the learner; the posts get moved - yet he still responds with his universal error message...

Is there anything I might have done wrong?

Database is clean too... hmmm...

What are the contents of tables pattern and template in the DB after you have run the botlearner?

Are you matching the questions exactly when you ask him?
Try matching just a single word.
See if it can correlate that.

So put in the post title: what
and in the message: huh

And see if it can match that up.

I haven't tried it from a clean slate, but I will give it a shot when I get a bit of time. Right now I'm without a testing version of my board.

ambrosious 08-28-2004 12:22 AM

See below.

ambrosious 08-28-2004 12:24 AM

Hang on, I do see a mistake, check back.

ambrosious 08-28-2004 12:26 AM

See below.

ambrosious 08-28-2004 03:23 PM

I must have been tired when I posted that, please look at 'this' code and see where I messed it up please?

Is there support for this?

PHP Code:

// bot learning cycle


else if ($_REQUEST['type'] == 'AIML')
{ // XML/AIML output


    $posts = $DB_site->query("
    SELECT post.title, post.pagetext, post.postid 
    FROM post
    WHERE post.threadid=http://www.adultadventurers.com/vbulletin/showthread.php?t=30093 AND post.postid!=http://www.adultadventurers.com/vbulletin/showthread.php?t=30093#post496060");

    $postcache = array();
    while ($post = $DB_site->fetch_array($posts))
    { // fetch the posts
    $postcache[] = $post;
    }

    // set XML type and nocache headers
    header('Content-Type: text/xml');
    header('Expires: ' . gmdate('D, d M Y H:i:s') . ' GMT');
    header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
    header('Pragma: public');

    // print out the page header
        echo '<?xml version="1.0" encoding="' . $stylevar['charset'] . '"?>' . "\r\n";
    echo '<aiml version="1.0">';
    
    
    foreach ($postcache AS $post)
    {
        echo "<category>";
        echo "<pattern>";
        echo strtoupper($post[title]);
        echo "</pattern>\r\n";
        echo "<template>   \r\n";
        echo $post[pagetext]."   \r\n";
        echo "</template>   \r\n";
        echo "</category>   \r\n";
    $DB_site->query("UPDATE post SET threadid=http://www.adultadventurers.com/vbulletin/showthread.php?t=30094 WHERE postid=".$post[postid]);
    }
    echo "\r\n</aiml>";
}


else if ($_REQUEST['type'] == 'AIMLSHARE')
{ // XML/AIML output
    $posts = $DB_site->query("
    SELECT post.title, post.pagetext, post.postid 
    FROM post
    WHERE post.threadid=http://www.adultadventurers.com/vbulletin/showthread.php?t=30094 AND post.postid!=http://www.adultadventurers.com/vbulletin/showthread.php?t=30094#post496062");

    $postcache = array();
    while ($post = $DB_site->fetch_array($posts))
    { // fetch the posts
    $postcache[] = $post;
    }

    // set XML type and nocache headers
    header('Content-Type: text/xml');
    header('Expires: ' . gmdate('D, d M Y H:i:s') . ' GMT');
    header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
    header('Pragma: public');

    // print out the page header
        echo '<?xml version="1.0" encoding="' . $stylevar['charset'] . '"?>' . "\r\n";
    echo '<aiml version="1.0">';
    
    foreach ($postcache AS $post)
    {
        echo "<category>";
        echo "<pattern>";
        echo strtoupper($post[title]);
        echo "</pattern>\r\n";
        echo "<template>   \r\n";
        echo $post[pagetext]."   \r\n";
        echo "</template>   \r\n";
        echo "</category>   \r\n";
    }
    echo "\r\n</aiml>";
}

/*======================================================================*\
|| ####################################################################
|| # Downloaded: 22:08, Sat May 22nd 2004
|| # CVS: $RCSfile: external.php,v $ - $Revision: 1.51 $
|| ####################################################################
\*======================================================================*/

Thanks for the help.

Moya 09-14-2004 05:48 AM

I've done verything without error

This is what I got when I ran the botlearner

Loading learnwhat.xml
Loading data aiml file: http://www.123.com/forum/external.php?type=AIML
could not open XML input


Any idea what is wrong here?

Thanks


All times are GMT. The time now is 05:23 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01110 seconds
  • Memory Usage 1,754KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete