How can I use ChatScript Library with function in my own program?

252 views Asked by At

How can I write a program that inside it, I can call ChatScript program, pass my input file to it and get the results as an output text file?

This is a example using ChatScript Library :

#include <fstream>
#include <iostream>
#include <string>
#include <chatScript.h> //for example!
using namespace std;

int main()
{
    ofstream output;
    string str1, str2;
    getline(cin, str1);

    //This is the ChatScript function that i am looking for!
    str2= ChatScript_input(str1); 

    output.open("output.txt");
    output<< "str2";
    output.close();

    return 0;
}
1

There are 1 answers

0
vvvlad On

I would suggest you ask the developer of ChatScript directly on the forum he monitors https://www.chatbots.org/ai_zone/viewforum/44/ Hope this is not against the rules here to post a link to an external forum.

As far as I understand CS opens a socket through which you are supposed to communicate with it. Here is the manual explaining how that can be done: https://github.com/bwilcox-1234/ChatScript/blob/master/WIKI/CLIENTS-AND-SERVERS/ChatScript-ClientServer-Manual.md