menu

voicehub

Voicehub Provides API Driven Content Management Combined with Conversational Analytics for Voice Apps

Channels
Team

Problems editing with parameters

June 6, 2019 at 3:50pm

Problems editing with parameters

June 6, 2019 at 3:50pm

I'm trying to enter a string with parameters - specifically: You had PlayerCards and I had DealerCards. But when I publish the changes, it saves as You had PlayerCards and I had `DealerCard

As a result, the second parameter doesn't save as a parameter...


June 6, 2019 at 4:09pm

Did you add both parameters to the model of the post? Under "Publish Changes" on the post, click on the model badge. That model should have 2 fields with type parameter and name PlayerCards and DealerCards. Then go back to your post and use the purple parameter buttons in the editor to insert it.

  • reply
  • like
  • reply
  • like

It should look something like this.

  • reply
  • like

OK - well now it doesn't seem to be reproducing the problem for me. I don't see the purple param buttons in the toolbar as in your picture though:

  • reply
  • like
  • reply
  • like

Also, is there a way to delete a post from a model? I created a dummy post to try and recreate this issue, but don't really need it cluttering up my model view.

  • reply
  • like

Hm, are you sure the model from the post has the 2 parameter fields? Only then you will see the 2 purple buttons.

You can delete the post in the right sidebar on the post.

  • reply
  • like

Thanks for the tip on deleting. yes, I know that I have a post with a parameter field, as the substitution happens correctly when I set withParameters.

  • reply
  • like

I see. Well actually as of right now, you don't need to declare the parameter in the model, it will get resolved anyway, that's why it's working for you :) But this will be changed very soon, meaning your model actually needs the parameters to be able to use them in the post and to have them resolved. So it would be good if you add them to make sure nothing breaks :) This is a picture of the model with the parameter in it. The purple buttons only show up when the parameter is declared in the model.

  • reply
  • like

Ah ... does that mean I need to create a separate model for each piece of content that takes a parameter? I want to give them cleaner names in my code - for example, in one place I may want a parameter name of "Bankroll" and in another a parameter named "PlayerCard". It seems a lot to add different models for each case based on the parameters I want to pass in (as opposed to the data that I want returned)...

  • reply
  • like

There is multiple ways you can achieve this, one is: add the parameters you need to a specific model, and also add fields for the speech content to that very same model. Then you can create a post based on that model which should have all the stuff you need.

  • reply
  • like

Ah OK - that worked, now I see the purple button. But it does mean I'm going to have to build several different models, since I'll have different parameter names in different places.

  • reply
  • like

Also, minor nit, but I prefer to use upper case for my parameter names (Bankroll rather than bankroll) ... seems odd that the tool enforces lowercase only.

  • reply
  • like

Also, minor nit, but I prefer to use upper case for my parameter names (Bankroll rather than bankroll) ... seems odd that the tool enforces lowercase only.

I will take a look at this. ;)

  • reply
  • like

Ah OK - that worked, now I see the purple button. But it does mean I'm going to have to build several different models, since I'll have different parameter names in different places.

Not quiet sure but that might help: It would mean you need to add more parameter fields to one model. You don't need to use every parameter in every post. We are currently working on making something like that easier because at the moment if you add multiple parameter the front end looks pretty big. We definitely are currently working on making the fields (and the other parts) much lighter and smaller.

If that doesn't help please let me know.

Edited
  • reply
  • like

Yeah - I can see it's a trade-off. Either I need to create a different model for each post that needs to pass a parameter, which ends up being time-consuming and ends up with a large set of models, or I need to give my parameters generic names so I can reuse models (e.g. model with param1, model with param1&param2, etc), but then my code becomes less readable

  • reply
  • like

June 18, 2019 at 2:05pm

@garrett-vargas So, we just deployed a new update to the dashboard including much easier handling of parameters. Would love your feedback on this! More info in the changelog: https://docs.voicehub.io/changelog

  • reply
  • like