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

Can GPS integration be added? #9

Open
BryanLDC opened this issue Oct 26, 2023 · 4 comments
Open

Can GPS integration be added? #9

BryanLDC opened this issue Oct 26, 2023 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@BryanLDC
Copy link

As something very far in the future, it is possible to add a feature to, for example, take the GPS coordinates of the smartwtch and create an interface that communicates, for example, with the OpenStreetMap API and process the output for questions such as:
"What restaurants are close to where I am?"

@DevEmperor
Copy link
Owner

Unfortunately, this is not possible. Since I do not know before a prompt whether GPS coordinates are needed, I would have to have them fetched for every question, which would require permanent location permission. I consider this excessive and is certainly not desired by most users. In addition, I would have to establish a connection to OpenStreetMap, whereby GPT does not even know when it should use this connection. The feature is more like another AI, whereas I just want to create a user interface for the previous models of OpenAI.

@BryanLDC
Copy link
Author

BryanLDC commented Oct 26, 2023

I understand, maybe what I had in mind was something more or less similar to this; WristAssist comes with a predefined role, let's call it "Tourist Guide", when activating this role, each request made to openai, a request will be previously made to some map API service, in this example OpenStreetMap (You will only be asked for permissions location to the user when activating the "Tourist Guide" role):
Example request: https://api.openstreetmap.org/api/0.6/map?bbox=-80.196856,25.756608,-80.186856,25.766607999999998

In the query request, something like:

  <node id="4235821639" visible="true" version="2" changeset="70497556" timestamp="2019-05-22T02:44:19Z" user="LeifRasmussen" uid="4312767" lat="25.7611532" lon="-80.1915783">
   <tag k="amenity" v="restaurant"/>
   <tag k="brand" v="Vapiano"/>
   <tag k="brand:wikidata" v="Q506252"/>
   <tag k="brand:wikipedia" v="en:Vapiano"/>
   <tag k="cuisine" v="italian"/>
   <tag k="name" v="Vapiano"/>
  </node>
  <node id="4235831895" visible="true" version="3" changeset="79225133" timestamp="2020-01-05T22:42:06Z" user="MapMan45" uid="10557475" lat="25.7619442" lon="-80.1914768">
   <tag k="amenity" v="pharmacy"/>
   <tag k="brand" v="CVS Pharmacy"/>
   <tag k="brand:wikidata" v="Q2078880"/>
   <tag k="brand:wikipedia" v="en:CVS Pharmacy"/>
   <tag k="healthcare" v="pharmacy"/>
   <tag k="name" v="CVS Pharmacy"/>
   <tag k="opening_hours" v="24/7"/>
   <tag k="short_name" v="CVS"/>
  </node>

And then this result will be concatenated to the chatgpt request, example:

If the user writes:
"What restaurants are near my location?"
It is sent to gpt:

What restaurants are near my location?

Current coordinates: 25.761608, -80.191856
Sites close to the location are:
   <node id="4235821639" visible="true" version="2" changeset="70497556" timestamp="2019-05-22T02:44:19Z" user="LeifRasmussen" uid="4312767" lat="25.7611532" lon="-80.1915783">
    <tag k="amenity" v="restaurant"/>
    <tag k="brand" v="Vapiano"/>
    <tag k="brand:wikidata" v="Q506252"/>
    <tag k="brand:wikipedia" v="en:Vapiano"/>
    <tag k="cuisine" v="italian"/>
    <tag k="name" v="Vapiano"/>
   </node>
   <node id="4235831895" visible="true" version="3" changeset="79225133" timestamp="2020-01-05T22:42:06Z" user="MapMan45" uid="10557475" lat="25.7619442" lon="-80.1914768">
    <tag k="amenity" v="pharmacy"/>
    <tag k="brand" v="CVS Pharmacy"/>
    <tag k="brand:wikidata" v="Q2078880"/>
    <tag k="brand:wikipedia" v="en:CVS Pharmacy"/>
    <tag k="healthcare" v="pharmacy"/>
    <tag k="name" v="CVS Pharmacy"/>
    <tag k="opening_hours" v="24/7"/>
    <tag k="short_name" v="CVS"/>
   </node>

Result returned by chatgpt (I tested from the playground):

Based on the information provided, there is a Vapiano restaurant near your location. Here are the details:

- Name: Vapiano
- Cuisine: Italian
- Brand: Vapiano
- Coordinates: 25.7611532, -80.1915783

Please note that this is just one restaurant near your location. There may be other restaurants nearby as well.

Maybe I only mention it as an idea, thank you very much for reading it!

@DevEmperor DevEmperor self-assigned this Oct 26, 2023
@DevEmperor
Copy link
Owner

Okay, that sounds plausible. The idea of doing this as a seperate, predefined chat is interesting. I'll put that on the to-do list. Thanks for the idea. :)

@DevEmperor DevEmperor reopened this Oct 26, 2023
@DevEmperor DevEmperor added the enhancement New feature or request label Oct 26, 2023
@muehlt
Copy link

muehlt commented Nov 8, 2023

Hi! You may want to have a look at Assistants API for this. It's rather simple to add the support client-side and then one could add custom logic for those tools.

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

No branches or pull requests

3 participants