Spaces:
Running
Running
Download dist/assets/github-copilot-headers-CVWOSrQr.js from Mike0021/MiniCPM5-Pi-Web-Agent: direct link, hf CLI and curl.
- Browser
- Download file 756 Bytes
-
https://huggingface.co/spaces/Mike0021/MiniCPM5-Pi-Web-Agent/resolve/main/dist/assets/github-copilot-headers-CVWOSrQr.js
- Command line
-
hf download hf://spaces/Mike0021/MiniCPM5-Pi-Web-Agent/dist/assets/github-copilot-headers-CVWOSrQr.js
-
curl -L -o github-copilot-headers-CVWOSrQr.js https://huggingface.co/spaces/Mike0021/MiniCPM5-Pi-Web-Agent/resolve/main/dist/assets/github-copilot-headers-CVWOSrQr.js
756 Bytes
| var i={};function u(r){return r==="cloudflare-workers-ai"||r==="cloudflare-ai-gateway"}function l(r){const e=r.baseUrl;return e.includes("{")?e.replace(/\{([A-Z_][A-Z0-9_]*)\}/g,(s,n)=>{const o=i[n];if(!o)throw new Error(`${n} is required for provider ${r.provider} but is not set.`);return o}):e}function a(r){const e=r[r.length-1];return e&&e.role!=="user"?"agent":"user"}function c(r){return r.some(e=>e.role==="user"&&Array.isArray(e.content)?e.content.some(t=>t.type==="image"):e.role==="toolResult"&&Array.isArray(e.content)?e.content.some(t=>t.type==="image"):!1)}function f(r){const e={"X-Initiator":a(r.messages),"Openai-Intent":"conversation-edits"};return r.hasImages&&(e["Copilot-Vision-Request"]="true"),e}export{f as b,c as h,u as i,l as r}; | |