When your site's server cannot directly access the locally hosted AI server, as is the case when your site is on a commercial hosting and your locally hosted AI server is in your internal network, you need some additional configuration. The problem here is the obvious networking issue of the live server not being able to access your internal network over the Internet.
You can solve these problems by using a service like Ngrok or Expose to proxy your connection to an Internet-accessible domain name, which has a valid TLS (HTTPS) certificate. If you are an advanced user you can even self-host Expose on a cloud VM, e.g. one hosted on Akamai (formerly Linode).
You will have to tell whichever service you are using to proxy the locally hosted AI service's API endpoint. For example, if you are using Expose with LM Studio you can do it like this:
expose share http://127.0.0.1:1234
You will be given the sharing URL. In this example, Expose will reply with something like this:
Thank you for using expose.Local-URL: 127.0.0.1:1234Dashboard-URL: http://127.0.0.1:4040Expose-URL: https://9spt2t56t7.example.com
This last bit is the endpoint URL you need to use with AITiny.
These services will generate a new, random URL every time you run their client. Therefore, you will have to update your AITiny plugin configuration and reload all your pages with an open editor to apply the change.
You can choose to pay an additional fee / subscription to these services – or self-host the server part of Expose, if you're of a more technical persuasion – to get a static domain name, i.e. one which will NOT change every time you run the client. This is worth it, as you will no longer have to update your AITiny configuration every single time.