Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Full stack/feature-branch-botonic1.0 #1700

Merged
merged 11 commits into from
Jul 28, 2021
Merged

Conversation

vanbasten17
Copy link
Contributor

@vanbasten17 vanbasten17 commented Jul 7, 2021

Depends on: #1646

Description

  • Added BotonicOutputParser to append parsedResponse (JSON with parsed messages instead of our internal xml, which is pretty unusable) to input object.
  • Added tests for this parser.
  • Modify project config to allow ts-js code and configure tests.
  • Bump & publish 1.0.0-alpha.0 version to start iterating.

Context

BotonicOutputParser have two main methods:

xmlToMessageEvents(html: string): Partial<BotonicEvent>[] // parses bot xml responses into an array of BotonicEvent, that will be commited later to the database depending on the environment (local/aws).
parseFromUserInput(input: any): Partial<BotonicEvent> // parses the user input into a BotonicEvent, with the same aim as the previous method.

Note: Still some things are expected to change. ATM, we are typing it with Partial because some information cannot be accessed at runtime in this part of code but later, so userId, eventId, from, ack, ... will be fulfilled from a component on top of its usage.

Approach

  • We have created a factory that given the resolved MessageType, execute the corresponding parsing strategy. First of all, it parses the common properties for all kind of messages, and then appends to it the specific properties for every message.

Testing

The pull request...

  • has unit tests

Copy link
Contributor

@ericmarcos ericmarcos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Niceee! Gogogo!

Base automatically changed from full-stack/add-core-models to master July 9, 2021 14:44
@vanbasten17 vanbasten17 changed the title Full stack/output parser Full stack/feature-branch-botonic1.0 Jul 9, 2021
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@ericmarcos ericmarcos force-pushed the full-stack/output-parser branch from a4b9444 to 3df40fc Compare July 15, 2021 10:49
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@vanbasten17 vanbasten17 force-pushed the full-stack/output-parser branch from c81a2db to 155aeb2 Compare July 28, 2021 08:23
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

vanbasten17 and others added 7 commits July 28, 2021 12:03
* chore(react): add experimental components directory with necessary changes

* chore(react): bump to alpha 1.0.0-alpha.0

* fix(react): allow carousel elements without buttons

* chore(react): bump react to v1.0.0-alpha.1
* chore(ner/intent): support for botonic full-stack

* refactor(plugin-ner, plugin-ic): baseUrl typed

Co-authored-by: Eric Lozano <ericlozano98@gmail.com>
@vanbasten17 vanbasten17 force-pushed the full-stack/output-parser branch from 25975bd to d11039f Compare July 28, 2021 10:03
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@vanbasten17 vanbasten17 merged commit e4aa2a9 into master Jul 28, 2021
@vanbasten17 vanbasten17 deleted the full-stack/output-parser branch July 28, 2021 10:28
@github-actions

This comment has been minimized.

@github-actions
Copy link

Unit Test Results

1 files  ±0  2 suites  ±0   4s ⏱️ ±0s
2 tests ±0  2 ✔️ ±0  0 💤 ±0  0 ❌ ±0 
3 runs  ±0  3 ✔️ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit e4aa2a9. ± Comparison against base commit e4aa2a9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants