/// <summary> /// Send a message to cleverbot asynchronously and get a response. /// </summary> /// <param name="message">your message sent to cleverbot</param> /// <returns>response from the cleverbot.com api</returns> public async Task <CleverbotResponse> GetResponseAsync(string message) { LastMessageSent = DateTime.Now; var resp = await CleverbotResponse.CreateAsync(message, _conversationState, _apiKey); _conversationState = resp.ConversationState; return(resp); }
public CleverbotResponse GetResponse(string message) { return(CleverbotResponse.CreateAsync(message, "", ApiKey).GetAwaiter().GetResult()); }
/// <summary> /// Send a message to cleverbot asynchronously and get a response. /// </summary> /// <param name="message">your message sent to cleverbot</param> /// <returns>response from the cleverbot.com api</returns> public Task <CleverbotResponse> GetResponseAsync(string message) { return(CleverbotResponse.CreateAsync(message, "", ApiKey)); }
/// <summary> /// Send a message to cleverbot asynchronously and get a response. /// </summary> /// <param name="message">your message sent to cleverbot</param> /// <returns>response from the cleverbot.com api</returns> public Task <CleverbotResponse> GetResponseAsync(string message, int?wacky = null, int?talkative = null, int?attentive = null) { return(CleverbotResponse.CreateAsync(message, "", ApiKey, wacky, talkative, attentive)); }