From: Brian Candler Date: 2010-08-09T23:56:56+09:00 Subject: Re: Is there any human talkable ruby library? Sniper Abandon wrote: > i have a rails project which should talk to humans. > i know it is not as much easy to do that. > so i planned to integrate any good ChatBot with my rails(obviously ruby) > code If you have a stateless Eliza program - one whose answers don't depend on any previous answers or messages typed in - which runs as a console app, then it should be easy. Open the program using IO.popen, send it a message, get a response, kill it, return the response to the user. If there is state in the conversation, then it's more difficult, because HTTP is a stateless protocol. You could keep a pool of Elizas, and the one you're talking to would be identified by a HTTP cookie, say. Then you'd have to kill any idle conversations. If this is your first Rails project, then you might be biting off rather a lot. If you can find an existing Ruby Eliza, that would be your easiest solution. If it's stateless then you just call it; if it's stateful then you keep the state in a session object. -- Posted via http://www.ruby-forum.com/.