Skip to content

Commit

Permalink
Add DeepSeek-R1 model (#16631)
Browse files Browse the repository at this point in the history
* Add DeepSeek-R1 model

* Update Metadatas

* Update CHANGELOG.md and optimise images

---------

Co-authored-by: raycastbot <[email protected]>
  • Loading branch information
degouville and raycastbot authored Jan 30, 2025
1 parent a5cf0cd commit 3b0e033
Show file tree
Hide file tree
Showing 11 changed files with 105 additions and 19 deletions.
6 changes: 6 additions & 0 deletions extensions/deepseeker/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# DeepSeeker - Quick Actions Changelog

## [New Features] - 2025-01-30

- 🐳 Add DeepSeek-R1 reasoning model
- 🔄 Rename the deepseek-chat model to DeepSeek-V3 (official name)
- 💸 Add token count and cost estimation for DeepSeek-R1

## [New Features] - 2025-01-19

- 🙋 Add `Ask LLM` command using pure user query input.
Expand Down
20 changes: 15 additions & 5 deletions extensions/deepseeker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ While [ChatGPT Quick Actions](https://www.raycast.com/alanzchen/chatgpt-quick-ac
1. Get your DeepSeek API key from [DeepSeek API](https://platform.deepseek.com/api_keys). It's like `sk-37cd5***********************ac74`. Paste it in the `DEEPSEEK_API_KEY` environment variable in Raycast Settings.
2. The `Custom API Endpoint` is optional. Only if you want to use a custom API endpoint such as ChatGPT's API. Leave it empty if you want to use the default DeepSeek API endpoint. A list of possible endpoints:

- DeepSeek: `https://api.deepseek.com/v1`
- ChatGPT: `https://api.openai.com/v1`
- Gemini: `https://generativelanguage.googleapis.com/v1beta/openai/`
- DeepSeek: `https://api.deepseek.com/v1`
- ChatGPT: `https://api.openai.com/v1`
- Gemini: `https://generativelanguage.googleapis.com/v1beta/openai/`

3. Choose `deepseek-chat` as the global preferred model. You can also customize the preferred model for each command.(For now, DeepSeeker only has one model)
3. Choose `DeepSeek-V3` or `DeepSeek-R1` (new reasoning model) as the global preferred model. You can also customize the preferred model for each command.

Enjoy using DeepSeeker! 🚀

Expand All @@ -33,5 +33,15 @@ Enjoy using DeepSeeker! 🚀
- [ ] Choose proopt when running the command
- [ ] 💬 Conversation Chat mode


> This extension is built highly inspired by [ChatGPT Quick Actions](https://www.raycast.com/alanzchen/chatgpt-quick-actions) by [Alan Chen](https://www.raycast.com/alanzchen).
## Metadatas

<details>
<summary>Wallpaper & Examples</summary>

The wallpaper for the Screenshots is the https://misc-assets.raycast.com/wallpapers/blue_distortion_2.heic

All the examples have been generated on [Elon Musk's Wikipedia page 1st Paragraph](https://en.wikipedia.org/wiki/Elon_Musk)

</details>
Binary file modified extensions/deepseeker/metadata/deepseeker-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified extensions/deepseeker/metadata/deepseeker-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified extensions/deepseeker/metadata/deepseeker-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified extensions/deepseeker/metadata/deepseeker-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified extensions/deepseeker/metadata/deepseeker-5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
79 changes: 66 additions & 13 deletions extensions/deepseeker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,19 @@
"description": "Performs one-shot actions with DeepSeek and more",
"icon": "icon.png",
"author": "ViGeng",
"contributors": [
"degouville"
],
"categories": [
"Productivity",
"Developer Tools"
],
"keywords": [
"DeepSeek",
"DeepSeek V3",
"DeepSeek R1",
"LLM"
],
"license": "MIT",
"commands": [
{
Expand Down Expand Up @@ -38,9 +47,13 @@
"value": "global"
},
{
"title": "deepseek-chat",
"title": "DeepSeek-V3",
"value": "deepseek-chat"
},
{
"title": "DeepSeek-R1",
"value": "deepseek-reasoner"
},
{
"title": "GPT-4o",
"value": "gpt-4o"
Expand Down Expand Up @@ -92,9 +105,13 @@
"value": "global"
},
{
"title": "deepseek-chat",
"title": "DeepSeek-V3",
"value": "deepseek-chat"
},
{
"title": "DeepSeek-R1",
"value": "deepseek-reasoner"
},
{
"title": "GPT-4o",
"value": "gpt-4o"
Expand Down Expand Up @@ -146,9 +163,13 @@
"value": "global"
},
{
"title": "deepseek-chat",
"title": "DeepSeek-V3",
"value": "deepseek-chat"
},
{
"title": "DeepSeek-R1",
"value": "deepseek-reasoner"
},
{
"title": "GPT-4o",
"value": "gpt-4o"
Expand Down Expand Up @@ -225,9 +246,13 @@
"value": "global"
},
{
"title": "deepseek-chat",
"title": "DeepSeek-V3",
"value": "deepseek-chat"
},
{
"title": "DeepSeek-R1",
"value": "deepseek-reasoner"
},
{
"title": "GPT-4o",
"value": "gpt-4o"
Expand Down Expand Up @@ -279,9 +304,13 @@
"value": "global"
},
{
"title": "deepseek-chat",
"title": "DeepSeek-V3",
"value": "deepseek-chat"
},
{
"title": "DeepSeek-R1",
"value": "deepseek-reasoner"
},
{
"title": "GPT-4o",
"value": "gpt-4o"
Expand Down Expand Up @@ -333,9 +362,13 @@
"value": "global"
},
{
"title": "deepseek-chat",
"title": "DeepSeek-V3",
"value": "deepseek-chat"
},
{
"title": "DeepSeek-R1",
"value": "deepseek-reasoner"
},
{
"title": "GPT-4o",
"value": "gpt-4o"
Expand Down Expand Up @@ -383,7 +416,7 @@
"default": "Answer the following question concisely: \n\n"
},
{
"name": "model_ask",
"name": "model_ask",
"description": "Override the global preferred model for this command",
"type": "dropdown",
"required": false,
Expand All @@ -395,9 +428,13 @@
"value": "global"
},
{
"title": "deepseek-chat",
"title": "DeepSeek-V3",
"value": "deepseek-chat"
},
{
"title": "DeepSeek-R1",
"value": "deepseek-reasoner"
},
{
"title": "GPT-4o",
"value": "gpt-4o"
Expand All @@ -411,7 +448,7 @@
"value": "gpt-4"
},
{
"title": "GPT-4 Turbo",
"title": "GPT-4 Turbo",
"value": "gpt-4-turbo"
},
{
Expand Down Expand Up @@ -449,9 +486,13 @@
"value": "global"
},
{
"title": "deepseek-chat",
"title": "DeepSeek-V3",
"value": "deepseek-chat"
},
{
"title": "DeepSeek-R1",
"value": "deepseek-reasoner"
},
{
"title": "GPT-4o",
"value": "gpt-4o"
Expand Down Expand Up @@ -503,9 +544,13 @@
"value": "global"
},
{
"title": "deepseek-chat",
"title": "DeepSeek-V3",
"value": "deepseek-chat"
},
{
"title": "DeepSeek-R1",
"value": "deepseek-reasoner"
},
{
"title": "GPT-4o",
"value": "gpt-4o"
Expand Down Expand Up @@ -549,9 +594,13 @@
"value": "global"
},
{
"title": "deepseek-chat",
"title": "DeepSeek-V3",
"value": "deepseek-chat"
},
{
"title": "DeepSeek-R1",
"value": "deepseek-reasoner"
},
{
"title": "GPT-4o",
"value": "gpt-4o"
Expand Down Expand Up @@ -618,9 +667,13 @@
"type": "dropdown",
"data": [
{
"title": "deepseek-chat",
"title": "DeepSeek-V3",
"value": "deepseek-chat"
},
{
"title": "DeepSeek-R1",
"value": "deepseek-reasoner"
},
{
"title": "GPT-4o",
"value": "gpt-4o"
Expand Down
15 changes: 15 additions & 0 deletions extensions/deepseeker/src/common.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,13 @@ export default function ResultView(prompt: string, model_override: string, toast
getResult();
}

async function retryWithDeepSeekReasoner() {
setModel("deepseek-reasoner");
setLoading(true);
setResponse("");
getResult();
}

useEffect(() => {
getResult();
}, []);
Expand Down Expand Up @@ -154,6 +161,14 @@ export default function ResultView(prompt: string, model_override: string, toast
icon={Icon.ArrowNe}
/>
)}
{model != "deepseek-reasoner" && (
<Action
title="Retry with DeepSeek Reasoner"
onAction={retryWithDeepSeekReasoner}
shortcut={{ modifiers: ["cmd", "shift"], key: "d" }}
icon={Icon.ArrowNe}
/>
)}
{sidenote}
</ActionPanel>
)
Expand Down
2 changes: 2 additions & 0 deletions extensions/deepseeker/src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ export function estimatePrice(prompt_token: number, output_token: number, model:
price = (prompt_token * 0.15 + output_token * 0.6) / 10000;
} else if (model == "gpt-4o") {
price = (prompt_token * 5.0 + output_token * 15.0) / 10000;
} else if (model == "deepseek-reasoner") {
price = (prompt_token * 2.0 + output_token * 2.5) / 10000;
} else if (model == "deepseek-chat") {
price = (prompt_token * input_price + output_token * output_price) / 10000;
// * there is a tmeporary discount for deepseek-chat, we ignore it for now
Expand Down
2 changes: 1 addition & 1 deletion extensions/deepseeker/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
"jsx": "react-jsx",
"resolveJsonModule": true
}
}
}

0 comments on commit 3b0e033

Please sign in to comment.