Closed scho0ck closed 2 years ago
If CodeProject.AI is running on a remote server you should be able to access the API via http://
If I understand correctly, by default the API field defaults to http://localhost:5000 which is inconvenient to have to set each time the page is loaded/refreshed. An environment variable to set the html to load a defined IP/hostname would be convenient.
That page is launched by the AI server itself, so "localhost" is the correct location for that window.
I'm assuming what you are looking to do is launch the dashboard from a different machine and have the URL populated automatically. An environment variable on the server won't help a webpage on a different server (different machines) but there's also the issue with a webpage not having access to a system's environment variables.
What we could do is sniff the URL of the dashboard page and use that as the URL for the server (the IPs must be the same given the server is serving the dashboard page)
That page is launched by the AI server itself, so "localhost" is the correct location for that window.
I'm assuming what you are looking to do is launch the dashboard from a different machine and have the URL populated automatically. An environment variable on the server won't help a webpage on a different server (different machines) but there's also the issue with a webpage not having access to a system's environment variables.
What we could do is sniff the URL of the dashboard page and use that as the URL for the server (the IPs must be the same given the server is serving the dashboard page)
I think that approach would work great. Another option would be to have that field be a saved property. In other words, serve the html up with that field to be have a Set/Configure button and then persistently save that input on the webserver code side
With the latest release this seem to be solved
Yes, for v1.5.1 this feature has been added.
Running SenseAI on a remote Server could we implement a variable to set "Service API Url"
Thanks