33 lines
856 B
PHP
33 lines
856 B
PHP
<?php
|
|
include_once("src/CamsAI/Engine.class.php");
|
|
// @TODO: Refactor this example program into an AI component library for use in other applications.
|
|
use CamsAI;
|
|
use System\Runtime\InteropServices;
|
|
|
|
define("APP_PATH", __DIR__."/bot");
|
|
|
|
|
|
// @TODO: Replace the username with the username of the user in the OS, or as specified by constructor.
|
|
$AI = new \CamsAI\Engine(APP_PATH, $_ENV['Username'], "parse_oob");
|
|
|
|
|
|
$response = $AI->SendChatRequest($message, $AI->user);
|
|
|
|
|
|
function parse_oob($OobXML)
|
|
{
|
|
$xml = simplexml_load_string($OobXML);
|
|
foreach ($xml as $tag => $value)
|
|
{
|
|
// Created handler for XML
|
|
\System\Diagnostics\Debug::WriteLine("[Application OOB Parser] OOB Tag Detected: ". $tag. "\r\n");
|
|
var_dump($value);
|
|
}
|
|
}
|
|
|
|
function sendButton()
|
|
{
|
|
\Terminal\Gui\MessageBox\Query("Hello","Hello World", "OK");
|
|
}
|
|
|