Update hf.js
Browse files7 unmodified lines89101112131415161718197 unmodified linesapp.use('hf/v1/chat/completions', createProxyMiddleware({target: 'http://localhost:3010',pathRewrite: {'hf/v1/chat/completions': 'v1/chat/completions', // 重写路径,将 /hf/v1/v2 替换为 /hf},changeOrigin: true,}));const port = process.env.HF_PORT || 7860;app.listen(port, () => {console.log(`Server is running at http://localhost:${port}`);});7 unmodified lines891011121314151617187 unmodified linesapp.use('hf/v1/chat/completions', createProxyMiddleware({target: 'http://localhost:3010',pathRewrite: {'^/hf/': '/',},}));const port = process.env.HF_PORT || 7860;app.listen(port, () => {console.log(`HF Proxy server is running at PORT: ${port}`);});
hf.js+2-3