Add explicit User-Agent to Ollama API calls
Node's default fetch sends a bare User-Agent that Google's CDN fronting ollama.com rejects with 403. curl worked because it sends curl/. Fixes organize (and search LLM ranking). Signed-off-by: William Mantly <wmantly@gmail.com>
This commit is contained in:
@@ -26,6 +26,7 @@ async function chatJSON(system, user){
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'Authorization': `Bearer ${conf.ollama.apiKey}`,
|
||||
'User-Agent': 'tpbproxy/1.0 (organize; +https://github.com/wmantly/tpbproxy)',
|
||||
},
|
||||
body: JSON.stringify({
|
||||
model: conf.ollama.model,
|
||||
|
||||
Reference in New Issue
Block a user