use nebius
Browse filesFiles changed (2)
188 unmodified lines18919019119219319419519619719819920021 unmodified lines2222232242252262272283 unmodified lines232233234235236237238239240241242243244245246247248249250251252253254255256188 unmodified linesconst client = new InferenceClient(token);let completeResponse = "";const useNebius = html?.length > 2_500;try {const chatCompletion = client.chatCompletionStream({model: MODEL_ID,provider: useNebius ? "nebius" : "sambanova",messages: [{role: "system",21 unmodified linescontent: prompt,},],max_tokens: useNebius ? 8_192 : 6_000,});while (true) {3 unmodified lines}const chunk = value.choices[0]?.delta?.content;if (chunk) {if (useNebius) {res.write(chunk);completeResponse += chunk;// Break when HTML is completeif (completeResponse.includes("</html>")) {break;}} else {let newChunk = chunk;if (chunk.includes("</html>")) {// Replace everything after the last </html> tag with an empty stringnewChunk = newChunk.replace(/<\/html>[\s\S]*/, "</html>");}completeResponse += newChunk;res.write(newChunk);if (newChunk.includes("</html>")) {break;}}}}188 unmodified lines18919019119219319419519619719821 unmodified lines2202212222232242252263 unmodified lines230231232233234235236237238239240241188 unmodified linesconst client = new InferenceClient(token);let completeResponse = "";try {const chatCompletion = client.chatCompletionStream({model: MODEL_ID,provider: "nebius",messages: [{role: "system",21 unmodified linescontent: prompt,},],max_tokens: 12_000,});while (true) {3 unmodified lines}const chunk = value.choices[0]?.delta?.content;if (chunk) {res.write(chunk);completeResponse += chunk;// Break when HTML is completeif (completeResponse.includes("</html>")) {break;}}}
13 unmodified lines1415161718192013 unmodified lines</div><div className="flex items-center justify-end gap-3"><ahref="https://huggingface.co/deepseek-ai/DeepSeek-V3-0324?inference_provider=sambanova"target="_blank"className="text-[12px] text-gray-300 hover:brightness-120 flex items-center gap-1 font-code">13 unmodified lines1415161718192013 unmodified lines</div><div className="flex items-center justify-end gap-3"><ahref="https://huggingface.co/deepseek-ai/DeepSeek-V3-0324?inference_provider=nebius"target="_blank"className="text-[12px] text-gray-300 hover:brightness-120 flex items-center gap-1 font-code">
server.js+8-23
src/components/tabs/tabs.tsx+1-1