Skip to content

Commit

Permalink
feat: add support for DeepSeek provider
Browse files Browse the repository at this point in the history
  • Loading branch information
yibudak committed Jan 27, 2025
1 parent 4968a48 commit 2ab3772
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,15 @@ provider = cohere
api_key = <your API key>
```

If you use [DeepSeek](https://www.deepseek.com):

```ini
[deepseek]
provider = deepseek
api_key = <your API key>
model = deepseek-chat
```

## 🙉 How to use

### Transform comments into commands and vice versa
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "fish_ai"
version = "1.0.3"
version = "1.1.0"
authors = [{ name = "Bastian Fredriksson", email = "realiserad@gmail.com" }]
description = "Provides core functionality for fish-ai, an AI plugin for the fish shell."
readme = "README.md"
Expand Down
6 changes: 6 additions & 0 deletions src/fish_ai/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,12 @@ def get_openai_client():
api_key=get_config('api_key'),
organization=get_config('organization'),
)
elif (get_config('provider') == 'deepseek'):
# DeepSeek is compatiable with OpenAI Python SDK
return OpenAI(
api_key=get_config('api_key'),
base_url='https://api.deepseek.com'
)
else:
raise Exception('Unknown provider "{}".'
.format(get_config('provider')))
Expand Down

0 comments on commit 2ab3772

Please sign in to comment.