אירוח עצמי של LLM קוד פתוח ל-DiscourseAI

The quick answer is a plugin to add that header. A work-around might be a local proxy server that you’d hit from Discourse and it’d add the header and ferry the data back to Discourse. An untrusted source suggests that you might be able to get NGINX to do that for you with something like

server {
    listen 80;
    
    location / {
        proxy_pass https://api.example.com;
        proxy_set_header SubscriptionKey xyz;
        proxy_set_header Host $host;
    }
}

There could be a clever way to add that to Discourse’s nginx config at some secret path (that also listened only to your server)

לייק 1