Cleverbot

A genserver implementation of the Cleverbot API to hold conversations with Cleverbot.

Example

{:ok, pid} = Cleverbot.start_link
Cleverbot.think(pid, "Hello, Cleverbot!")

session = Cleverbot.get_session(pid)
IO.puts List.first(session.history)
Source

Summary

get_session(pid)

Retreive the current Cleverbot.Session

start_link(session \\ %Cleverbot.Session{}, http \\ HTTPoison)

Starts a Cleverbot process. You can pass in an existing Cleverbot.Session as the first argument

think(pid, message)

Sends the given message to the Cleverbot process and returns Cleverbot’s reply

Functions

get_session(pid)

Retreive the current Cleverbot.Session.

Source
start_link(session \\ %Cleverbot.Session{}, http \\ HTTPoison)

Starts a Cleverbot process. You can pass in an existing Cleverbot.Session as the first argument.

Source
think(pid, message)

Sends the given message to the Cleverbot process and returns Cleverbot’s reply.

Source