Code Monkey home page Code Monkey logo

assister's People

Contributors

keyvan-m-sadeghi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

assister's Issues

Can't connect to the Rasa server

I've input the code snippets according to instructions in README.

<!doctype html>
<html lang="en">
  <head>
    <script type="module" src="https://unpkg.com/@assister/rasa@latest/dist/rasa/rasa.esm.js"></script>
    <script nomodule src="https://unpkg.com/@assister/rasa@latest/dist/rasa/rasa.js"></script>
    <link href="https://unpkg.com/@assister/rasa@latest/dist/rasa/rasa.css" rel="stylesheet">
    <style>
      :root {
    /* --header-background-color: gray; */
    /* --header-text-color: black; */
}
    </style>
  </head>
  <body>
    <rasa-bot server="http://localhost:5005" />
  </body>
</html>

I also tried with the public ip and domain name like this (the Rasa and Client app are on the same server right now):

<rasa-bot server="http://my-public-ip:5005" />

But I get thisoutput in the developer tools console:

rasa-bot.entry.js:267 POST http://localhost:5005/conversations/a3cceec6-d092-4608-a472-4d246d2ceacf/predict net::ERR_CONNECTION_REFUSED

The rasa server is running, port 5005 is open and I added this to credentials.yml:

rest:
#  # you don't need to provide anything here - this channel doesn't
#  # require any credentials

What's wrong here? Why is there no connection?

JavaScript interface for TFx

Just musing:

interface Pattern<T> {
  (matcher: (string | Macro | Pattern<unknown>)[]): Pattern<T>;
  resolve<S>(callback: (parsed: string[]) => S): Pattern<S>;
  convert(descriptor): Pattern<T>;
  fromString(string: string): Parsable<T>;
}

interface Parsable<T> {
  parse: () => Promise<T>;
}

interface Macro {
  (...args): Pattern<unknown>;
}

const pattern = {} as Pattern<unknown>;

const string = {} as Macro;
const number = {} as Macro;
const repeat = {} as Macro;
const or = {} as Macro;
const option = {} as Macro;

const types = {
  number: pattern(['number']).resolve(() => 'number'),
  date: pattern(['date']).resolve(() => 'date'),
};

const type = pattern([or(types.number, types.date)]);

const cell = pattern([
  string({ case: 'upper', characters: 'alphabetic' }),
  number({ range: { start: 1 } }),
]).resolve(([column, row]) => [row, column]);

const range = pattern([cell, cell]).resolve(([start, end]) => ({ start, end }));

const selection = pattern([repeat(cell, range, { seperator: ',' })]).convert({
  cell: value => ({ start: value, end: value }),
});

const format = pattern(['format', selection, 'as', type]);

const command = format.fromString('format A1:A10,B1 as date');

command.parse().then(([selection, type]) => {
  console.log(selection, type);
});

Getting response from Rasa without any user input

As soon as I open the UI in browser, the UI displays a message when it normally should do action_listen.

Here's server start:
ubuntu@ip-172-31-27-224$ docker run -p 5005:5005 -v $(pwd):/app rasa/rasa:latest-full run -p 5005 --cors "*" --enable-api --log-file out.log --debug
2019-12-13 04:08:31 DEBUG rasa.cli.utils - Parameter 'endpoints' not set. Using default location 'endpoints.yml' instead.
2019-12-13 04:08:31 DEBUG rasa.cli.utils - Parameter 'credentials' not set. Using default location 'credentials.yml' instead.
2019-12-13 04:08:32 DEBUG rasa.core.utils - Available web server routes:
/conversations/<conversation_id>/messages POST add_message
/conversations/<conversation_id>/tracker/events POST append_events
/webhooks/rasa GET custom_webhook_RasaChatInput.health
/webhooks/rasa/webhook POST custom_webhook_RasaChatInput.receive
/webhooks/rest GET custom_webhook_RestInput.health
/webhooks/rest/webhook POST custom_webhook_RestInput.receive
/model/test/intents POST evaluate_intents
/model/test/stories POST evaluate_stories
/conversations/<conversation_id>/execute POST execute_action
/domain GET get_domain
/ GET hello
/model PUT load_model
/model/parse POST parse
/conversations/<conversation_id>/predict POST predict
/conversations/<conversation_id>/tracker/events PUT replace_events
/conversations/<conversation_id>/story GET retrieve_story
/conversations/<conversation_id>/tracker GET retrieve_tracker
/status GET status
/model/predict POST tracker_predict
/model/train POST train
/model DELETE unload_model
/version GET version
2019-12-13 04:08:32 INFO root - Starting Rasa server on http://localhost:5005
2019-12-13 04:08:32 DEBUG rasa.core.utils - Using the default number of Sanic workers (1).
2019-12-13 04:08:32 INFO root - Enabling coroutine debugging. Loop id 94360658814392.
2019-12-13 04:08:32 DEBUG rasa.model - Extracted model to '/tmp/tmpw2eav37k'.
2019-12-13 04:08:36.810930: E tensorflow/stream_executor/cuda/cuda_driver.cc:318] failed call to cuInit: UNKNOWN ERROR (303)
2019-12-13 04:08:37 DEBUG rasa.core.tracker_store - Connected to InMemoryTrackerStore.
2019-12-13 04:08:37 DEBUG rasa.core.lock_store - Connected to lock store 'InMemoryLockStore'.
2019-12-13 04:08:37 DEBUG rasa.model - Extracted model to '/tmp/tmpgj627mrc'.
2019-12-13 04:08:37 DEBUG pykwalify.compat - Using yaml library: /build/lib/python3.6/site-packages/ruamel/yaml/init.py
2019-12-13 04:08:38 DEBUG rasa.core.nlg.generator - Instantiated NLG to 'TemplatedNaturalLanguageGenerator'.

Then I open the UI after starting node.js server
2019-12-13 04:13:33 DEBUG rasa.core.tracker_store - Creating a new tracker for id '7293772f-09f8-46c3-8719-9e5a10e13c15'.
2019-12-13 04:13:33 DEBUG rasa.core.policies.memoization - Current tracker state [None, None, None, {}, {'prev_action_listen': 1.0}]
2019-12-13 04:13:33 DEBUG rasa.core.policies.memoization - There is no memorised next action
2019-12-13 04:13:33 DEBUG rasa.core.policies.ensemble - Predicted next action using policy_1_KerasPolicy
2019-12-13 04:13:33 DEBUG rasa.core.tracker_store - Recreating tracker for id '7293772f-09f8-46c3-8719-9e5a10e13c15'
2019-12-13 04:13:33 DEBUG rasa.core.tracker_store - Recreating tracker for id '7293772f-09f8-46c3-8719-9e5a10e13c15'
2019-12-13 04:13:33 DEBUG rasa.core.processor - Action 'utter_kenz_inquiry' ended with events '['BotUttered(text: At Kenz, our ultimate goal is to bring out the peak taste in every bean. It starts with picking the best green beans and micro-roasting each batch, one pound at a time. It's best when we know how you prepare your coffee in order to best roast your beans., data: {"elements": null, "quick_replies": null, "buttons": null, "attachment": null, "image": null, "custom": null}, metadata: {})']'
2019-12-13 04:13:33 DEBUG rasa.core.lock_store - Deleted lock for conversation '7293772f-09f8-46c3-8719-9e5a10e13c15'.
2019-12-13 04:13:33 DEBUG rasa.core.tracker_store - Recreating tracker for id '7293772f-09f8-46c3-8719-9e5a10e13c15'
2019-12-13 04:13:33 DEBUG rasa.core.tracker_store - Recreating tracker for id '7293772f-09f8-46c3-8719-9e5a10e13c15'
2019-12-13 04:13:33 DEBUG rasa.core.policies.memoization - Current tracker state [None, None, {}, {'prev_action_listen': 1.0}, {'prev_utter_kenz_inquiry': 1.0}]
2019-12-13 04:13:33 DEBUG rasa.core.policies.memoization - There is no memorised next action
2019-12-13 04:13:33 DEBUG rasa.core.policies.mapping_policy - There is no mapped action for the predicted intent, 'None'.
2019-12-13 04:13:33 DEBUG rasa.core.policies.ensemble - Predicted next action using policy_1_KerasPolicy
2019-12-13 04:13:33 DEBUG rasa.core.tracker_store - Recreating tracker for id '7293772f-09f8-46c3-8719-9e5a10e13c15'
2019-12-13 04:13:33 DEBUG rasa.core.tracker_store - Recreating tracker for id '7293772f-09f8-46c3-8719-9e5a10e13c15'
2019-12-13 04:13:33 DEBUG rasa.core.processor - Action 'action_listen' ended with events '[]'
2019-12-13 04:13:33 DEBUG rasa.core.lock_store - Deleted lock for conversation '7293772f-09f8-46c3-8719-9e5a10e13c15'.
2019-12-13 04:13:33 DEBUG rasa.core.tracker_store - Recreating tracker for id '7293772f-09f8-46c3-8719-9e5a10e13c15'

This isn't a Rasa issue because I only see this when using Assister UI. I bolded likely culprit.

Best regards,
HN

Button support?

Hi,
Are buttons supported or is there a plan to support buttons?
Thanks!
Hassan

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.