To implement Google Place Autocomplete API, Is session_token mandatory? - autocomplete

I want to use The places autocomplete API for implementing search easily. As per the billing documentation of Google, it is said that if session_token is not defined then the billing will be done independently.
My questions are:
1. Is it better to use the session_token method for autocomplete rather than independent method.
If yes, then it says using UUID 4 for session_token passing mechanism, I'd like to know how to use that on frontend.
Thanks.

Related

Using "speechBiasingHints" with Dialogflow Webhook

First time posting, so feel free to give me feedback if I could improve something about this post... Now on to my question.
I am currently developing a Google Action, the Action will allow the user to define important events, such as Bob's Birthday or Fred's Graduation, and save data about said events. Later, the user will be able to ask for info about the event and get it returned back to them.
I am using the Dialogflow API with "Inline Editor" fulfillment to keep it as simple as possible for right now. The problem I am running into is this, the event has an entity type of #sys.any, so anything the user says is excepted as valid input. I would like some way to bias towards events I already have stored for the user however, so that they are more likely to find the event they are looking for.
I found another answer on here discussing speech biasing (What is meant by speech bias and how to use speechBiasHints in google-actions appResponse) which defined speech biasing as the ability to"influence the speech to text recognition," which is exactly what I believe I want. While that answer provided sample code, it was for the Actions SDK, not the Dialogflow SDK, which I am using.
Can anyone provide an example of how to fill the "speechBiasingHints" section of the ExpectedInput response of the Conversation Webhook using the DialogFlow Webkook?
Note: This is for a student project, and I'm new to developing Google Actions and still very much learning about everything that is capable with Google Actions. Any feedback or suggestions are very welcome.
The question you link to does quite a few things differently than the approach you're taking. The Action SDK provides more low-level control, but doesn't have much Natural Language Processing (NLP) capabilities, which Dialogflow provides.
Dialogflow handles biasing a little differently through the use of Entities, so you don't need to control the speech biasing directly, Dialogflow can handle that for you, to some extent.
Since each user may have a different event name, you'll probably want to use a User Entity, which is an entity you define and then populate on a user-by-user basis through Dialogflow's API. In your sample phrases, you can then use this entity name instead of #sys:any, or create another set of phrases that use this entity in addition.

Using Amazon's affiliate API for autocompletion

On a website I'm building a search for Amazon products. This should display some information on the products I can pick up using their affiliate API. I can look up information on the products using this dependency (which I'm not entirely happy about, because I should probably create my own package from their provided WSDL), but I'm not entirely sure what would be the best way to implement an autocomplete in a searchbox for their products.
I want to load the autocomplete information from my own server rather than one of Amazon's, but I am not certain what the recommended way to do this would be. Through the provided Amazon affiliate API or is there a better way?
As a summary, I am looking for a way where I have a textbox with autocompletion on my website, that uses my own server to do the autocompletion (example.com/search/autocomplete/%QUERY%), which should then call some autocompletion functionality on the Amazon API.
Amazon offers -next to their affiliate API- a webservice which can be used to get their autocomplete information. It can be utilized by calling an URL in the style of:
http://completion.amazon.com/search/complete?search-alias=aps&client=amazon-search-ui&mkt=1&q=canon
Where the contents of q is the query that you want autocompleted.
I created a vanilla JavaScript plugin to integrate the Amazon Autocomplete webservice into a search input.
Fortunately, the Amazon webservice is JSONP enabled so it let you handle the requests via <script> tags and callbacks, which is already implemented in the plugin.
https://github.com/caroso1222/amazon-autocomplete

async autocomplete service

Call me crazy, but I'm looking for a service that will deliver autocomplete functionality similar to Google, Twitter, etc. After searching around for 20 min I thought to ask the geniuses here. Ideas?
I don't mind paying, but it would great if free.. Also is there a top notch NLP service that I can submit strings to and get back states, cities, currencies, company names, establishments, etc. Basically I need to take unstructured data (generic search string) and pull out key information with relevant meta-data.
Big challenge, I know.
Sharing solutions I found after further research.
https://github.com/haochi/jquery.googleSuggest
http://shreyaschand.com/blog/2013/01/03/google-autocomplete-api/
If you dont want to implement it yourself, you can use this service called 'Autocomplete as a Service' which is specifically written for these purposes. You can access it here - www.aaas.io.
you can add metadata with each record and it returns metadata along with the matching results. Do check out demo put up on the home page. It has got a very simple API specifically written for autocomplete search
It does support large datasets and you can apply filters as well while searching.
Its usage is simple - Add your data and use the API URL as autocomplete data source.
Disclaimer: I am founder of it. I will be happy to provide this service to you.

Method to allow email recipients to change their account information

I'm using SugarCRM Community Edition. I have a bunch of contact information. There are fields I have empty that would like filled. I want each user to be able to fill out a form and fill in those fields.
I'm not sure how to hook each contact into the database. I imagine creating a generic form that somehow hooks into the database using a key. The form/php is not the issue. What is the 'key' and where is the 'door'? I think the door is the SOAP API but I'm not sure. The key, maybe the tracker id?
The only thing I am familiar with as far as interaction between an email campaign and the contact is the campaign 'Tracker'. I know the tracker url with removeme is used for allowing the user to opt out of emails. Is there a way to use this tracker to allow the person to edit their information? I think the answer to this is easy but I need some guidance.
One way of doing this is using the built-in REST api. There are a couple of helpful tutorials out there, here is a link to the one I used for guidance in a similar situation.
You can have a form post the data to your sugar crm's REST gateway, accessible via the url http://localhost/sugar/v2/rest.php.
Although it is quite straightforward to implement, you may want to look at this wrapper class that can be used to maybe keep things cleaner than the hacked up script churned out on the spur of the moment I used in my project.
Last but not least, be sure to glance over the documentation, in the Web Services section you will find more information.
Good-luck

Symfony form get user id

In order to filter the available options on one section of my web application, I would like to get the user object at the form object. I found some information about possible ways to do that (using sfContext, for instance) but some users discouraged this approach.
What is a possible manner to achieve my purpose?
The best way is to add some logic to BaseForm so you can use self::getValidUser(); without ever using sfContext, which is indeed generally not recommended.
Check this awesome blog post for more infos : http://prendreuncafe.com/blog/post/2010/02/17/User-Dependant-Forms-with-Symfony