Giving DeepSeek a Spin

In my previous post, I mentioned how I used Gemini to implement a one-click bookmark organization feature. The feedback for the feature was quite positive. However, recently I noticed an increase of errors from Gemini, such as occasional 503 errors, em…


This content originally appeared on DEV Community and was authored by sheep

In my previous post, I mentioned how I used Gemini to implement a one-click bookmark organization feature. The feedback for the feature was quite positive. However, recently I noticed an increase of errors from Gemini, such as occasional 503 errors, empty responses, or timeouts exceeding 1 minute.

I’m not sure if the issues are caused by the lengthy context when processing a large number of bookmarks, or the high frequency of API calls, or simply because I’m using the free tier of Gemini 2.5 Flash. I need some more time to investigate these issues, but before that, I'd like to give DeepSeek a try to handle the categorization and organization. I am very curious to see how it performs.

Using DeepSeek

As introduced in its official documentation, DeepSeek’s API can be called in various way, I simply used axios to invoke it. After obtaining a DeepSeek API key, I reused the same prompt originally designed for Gemini and created a DeepSeek version of the send function.

import axios from 'axios';

const path = 'https://api.deepseek.com/chat/completions';

async function send(content) {
  const data = {
    "messages": [
      {
        "content": content,
        "role": "user"
      }
    ],
    "model": "deepseek-chat",
    "max_tokens": 8192, // max
    "response_format": { "type": "text" },
    "stream": false,
    "temperature": 1,
    "top_p": 1,
  };

  const res = await axios.post(path, data, {
    maxBodyLength: Infinity,
    headers: {
      'Content-Type': 'application/json',
      'Authorization': `Bearer ${process.env.DS_KEY}`
    }
  });

  if (res?.status !== 200) {
    console.error('Failed send res:', res)
    throw new Error()
  }

  const { message } = res?.data?.choices?.[0] || {};
  return message?.content;
}

Switching from Gemini’s send function to DeepSeek’s required no other code changes, the replacement was seamless.

The Chrome extension is now available. I’ll monitor its performance for a while and see if DeepSeek offers better stability. Feel free to check out my extension Bookmark Dashboard, and try out the DeepSeek version of the one-click bookmark organization feature!

Thanks for reading!


This content originally appeared on DEV Community and was authored by sheep


Print Share Comment Cite Upload Translate Updates
APA

sheep | Sciencx (2025-09-18T14:39:24+00:00) Giving DeepSeek a Spin. Retrieved from https://www.scien.cx/2025/09/18/giving-deepseek-a-spin/

MLA
" » Giving DeepSeek a Spin." sheep | Sciencx - Thursday September 18, 2025, https://www.scien.cx/2025/09/18/giving-deepseek-a-spin/
HARVARD
sheep | Sciencx Thursday September 18, 2025 » Giving DeepSeek a Spin., viewed ,<https://www.scien.cx/2025/09/18/giving-deepseek-a-spin/>
VANCOUVER
sheep | Sciencx - » Giving DeepSeek a Spin. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/09/18/giving-deepseek-a-spin/
CHICAGO
" » Giving DeepSeek a Spin." sheep | Sciencx - Accessed . https://www.scien.cx/2025/09/18/giving-deepseek-a-spin/
IEEE
" » Giving DeepSeek a Spin." sheep | Sciencx [Online]. Available: https://www.scien.cx/2025/09/18/giving-deepseek-a-spin/. [Accessed: ]
rf:citation
» Giving DeepSeek a Spin | sheep | Sciencx | https://www.scien.cx/2025/09/18/giving-deepseek-a-spin/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.