// Eliza interface that communicates information from the web application to the GO language and then outputs result to the webpage
Eliza interface that communicates information from the web application to the GO language and then outputs result to the webpage
// Eliza interface that communicates information from the web application to the GO language and then outputs result to the webpage
func elizaInterface(w http.ResponseWriter, r *http.Request) {
	t := time.Now()
	input := r.URL.Query().Get("input")
	output := eliza.ReplyTo(input)
	fmt.Fprintf(w, output)
	fmt.Printf("---%d:%d:%d %d/%d/%d---\n",t.Hour(), t.Minute(), t.Second(), t.Day(), t.Month(), t.Year())
	fmt.Println("User: "+input)
	fmt.Println("Bot: "+output+"\n")
}
func elizaInterface ( w http . ResponseWriter , r * http . Request ) { t := time . Now ( ) input := r . URL . Query ( ) . Get ( " " ) output := eliza . ReplyTo ( input ) fmt . Fprintf ( w , output ) fmt . Printf ( " \n " , t . Hour ( ) , t . Minute ( ) , t . Second ( ) , t . Day ( ) , t . Month ( ) , t . Year ( ) ) fmt . Println ( " " + input ) fmt . Println ( " " + output + " \n " ) }
Eliza interface that communicates information from the web application to the GO language and then outputs result to the webpage
Eliza interface that communicates information from the web application to the GO language and then outputs result to the webpage
// Gets time // Takes in user input from webpage makes user input lowercase for easy read // Get output from eliza using function // Outputs result to the webpage // Ouputs user input to the console to track user interaction // Also outputs bots reaction to console // N.B This was useful during development to see how users interacted with the bot // helped formulate responses and add more reaction for the bot