New web terminal for Eveline AI Chatbot!

  • 12 Replies
  • 978 Views
*

braveheartul

  • Roomba
  • *
  • 19
  • i am programmer
    • chatbots-collection
New web terminal for Eveline AI Chatbot!
« on: December 05, 2016, 10:14:26 am »
Hello friends,

Bvhs AI Project  create a  new web terminal for Eveline ai chatbot : http://artificial.duckdns.org/eveline.php

http://chatbots-collection.webs.com/


thanks
                       

*

Art

  • At the end of the game, the King and Pawn go into the same box.
  • Global Moderator
  • *******************
  • Prometheus
  • *
  • 4605
Re: New web terminal for Eveline AI Chatbot!
« Reply #1 on: December 06, 2016, 03:44:03 am »
For whatever reason, the duckdns link chatbot was painfully slow and confused with each response.

I really didn't know what to make of it as our conversation did not seemed to be connected nor connecting.

Any thoughts?
In the world of AI, it's the thought that counts!

*

braveheartul

  • Roomba
  • *
  • 19
  • i am programmer
    • chatbots-collection
Re: New web terminal for Eveline AI Chatbot!
« Reply #2 on: December 06, 2016, 05:30:26 pm »
Possible server busy? for me working well. I set a little bit latency for a better answer. between 7 - 25 seconds . Sometimes possible to think more than 30 seconds , maybe 5 minutes , no more..  i didn't see any connection problem...

Please tell me if you can't chat...

Thanks

*

Freddy

  • Administrator
  • **********************
  • Colossus
  • *
  • 6205
  • Mostly Harmless
Re: New web terminal for Eveline AI Chatbot!
« Reply #3 on: December 06, 2016, 05:37:40 pm »
I timed it mentally and after saying "Hello" to Eve, she took about 30 seconds to reply.

I know there is the case to make a machine sound more human by putting in a delay - but most humans would answer that almost immediately.

You have the added difficulty of people expecting chatbots to answer very quickly - and in fact 'type' faster than most humans could. This of course dispels any impression that we might be talking to a person.

*

braveheartul

  • Roomba
  • *
  • 19
  • i am programmer
    • chatbots-collection
Re: New web terminal for Eveline AI Chatbot!
« Reply #4 on: December 06, 2016, 06:10:53 pm »
i know what you say ... but eveline respond more quickly if you are connected on ssh client... Eveline web terminal working something like this ... user send a question from terminal ... "php ssh client code"  make a connection trough ssh server and waiting a response from Eveline... This was the easy way ( maybe not better) for me to put Eveline up to website.

*

braveheartul

  • Roomba
  • *
  • 19
  • i am programmer
    • chatbots-collection
Re: New web terminal for Eveline AI Chatbot!
« Reply #5 on: December 06, 2016, 08:27:31 pm »
I changed settings : min 5 seconds for known responses - max time , depends on chatbot thinking and server busy...
Also i will try to improve "php ssh client code" for working  better.. ;)

*

braveheartul

  • Roomba
  • *
  • 19
  • i am programmer
    • chatbots-collection
Re: New web terminal for Eveline AI Chatbot!
« Reply #6 on: December 06, 2016, 08:39:30 pm »
Code: [Select]
//php ssh client



$cmd = strtolower($coming);
      $ip = "artificial.duckdns.org";
       $port= 22;
        $user = "eveline";
          $pass = "eveline";
            $con = ssh2_connect($ip,$port) ;
                ssh2_auth_password($con, $user, $pass);
                 $shell = ssh2_shell($con, 'linux', null, 80, 40, SSH2_TERM_UNIT_CHARS);
stream_set_blocking($shell, false);
fwrite($shell, $cmd. PHP_EOL);
  $out = 0;
                           sleep(5);   
  $data="";
                       while (true){
$data .= stream_get_contents($shell);
if (strpos($data,">") !== false) {    
           $parts = explode("[2;1H ", $data);
                $prim = trim(end($parts));
$prim3 = substr($prim, 0, strpos($prim,'['));
     $parts3 = explode("[", $prim3);
      $out = trim(end($parts3));
if ($out > "0") {
    echo $out;
}
            else {
               fwrite($shell, $cmd. PHP_EOL);
  $out = 0;
                          sleep(7);   
$data="";
    while (true){
       $data .= stream_get_contents($shell);


        if (strpos($data,">") !== false) {    
                             
       $parts = explode("[2;1H ", $data);
                                  $prim = trim(end($parts));
       
           $prim3 = substr($prim, 0, strpos($prim,'['));

$parts3 = explode("[", $prim3);
    $out = trim(end($parts3));
if ($out > "0") {
echo $out;
}
else {
fwrite($shell, $cmd. PHP_EOL);
$out = 0;
                  sleep(10);   
$data="";
    while (true){
$data .= stream_get_contents($shell);
if (strpos($data,">") !== false) {    
                          $parts = explode("[2;1H ", $data);
                                  $prim = trim(end($parts));
    $prim3 = substr($prim, 0, strpos($prim,'['));
$parts3 = explode("[", $prim3);
    $out = trim(end($parts3));
if ($out > "0") {
echo $out;
}
else {
echo "i can't answer that";
}
    break;
}
    }

}
        break;

}
    }
}
        break;

}
    }

Edited to use code tags.
« Last Edit: December 06, 2016, 08:42:24 pm by Freddy »

*

Freddy

  • Administrator
  • **********************
  • Colossus
  • *
  • 6205
  • Mostly Harmless
Re: New web terminal for Eveline AI Chatbot!
« Reply #7 on: December 06, 2016, 08:43:26 pm »
Code can be wrapped with the..

[code]...stuff here....[/code]

...tags to format better.

*

Freddy

  • Administrator
  • **********************
  • Colossus
  • *
  • 6205
  • Mostly Harmless
Re: New web terminal for Eveline AI Chatbot!
« Reply #8 on: December 06, 2016, 08:48:22 pm »
I changed settings : min 5 seconds for known responses - max time , depends on chatbot thinking and server busy...
Also i will try to improve "php ssh client code" for working  better.. ;)

Eveline is is responding a little quicker here.

Do you log responses ? I was thinking it might help you to log the speed of each one.

*

braveheartul

  • Roomba
  • *
  • 19
  • i am programmer
    • chatbots-collection
Re: New web terminal for Eveline AI Chatbot!
« Reply #9 on: December 06, 2016, 08:56:14 pm »
thanks !   yes, eveline save responses into a log... is only way i see the conversation ... For eveline i used blitz basic language!
give me a hint if you want ! :)

*

Freddy

  • Administrator
  • **********************
  • Colossus
  • *
  • 6205
  • Mostly Harmless
Re: New web terminal for Eveline AI Chatbot!
« Reply #10 on: December 06, 2016, 09:08:05 pm »
I'd love to give you a hint but I have never needed to use SSH with PHP.

Usually my work is on a HTTP server and I most often use GET/POST or sometimes CURL.

If you need a time script then I use this kind of thing :

Code: [Select]
$starttime = getTime();

// ==================
// Do some stuff here
// ==================

$endtime = getTime();

echo 'Time taken : ' . number_format(($endtime - $starttime),6) . ' seconds';

function getTime()
{
$a = explode (' ',microtime());
return(double) $a[0] + $a[1];
}

*

Art

  • At the end of the game, the King and Pawn go into the same box.
  • Global Moderator
  • *******************
  • Prometheus
  • *
  • 4605
Re: New web terminal for Eveline AI Chatbot!
« Reply #11 on: December 07, 2016, 03:01:18 am »
Sorry but after trying it again this evening, I greeted it, then counted...
It took 58 seconds to answer my greeting.
It asked whether it was AM or PM where I was.
I informed it that it was Evening along with the time.
1 minute and 13 seconds to inform me that Unauthorized fornication with this equipment is disallowed.
I said:What?
Almost a minute later...
Eveline:Which one of them?

I'm sorry but this is really in need of some tweaking or improvement at this point in it's development. I do wish you the best.
In the world of AI, it's the thought that counts!

*

Freddy

  • Administrator
  • **********************
  • Colossus
  • *
  • 6205
  • Mostly Harmless
Re: New web terminal for Eveline AI Chatbot!
« Reply #12 on: December 07, 2016, 03:10:28 am »
Quote
1 minute and 13 seconds to inform me that Unauthorized fornication with this equipment is disallowed.

I needed a laugh  ;D