polyllm-deepseek 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- polyllm_deepseek-0.1.0/LICENSE +21 -0
- polyllm_deepseek-0.1.0/PKG-INFO +36 -0
- polyllm_deepseek-0.1.0/README.md +9 -0
- polyllm_deepseek-0.1.0/pyproject.toml +38 -0
- polyllm_deepseek-0.1.0/setup.cfg +4 -0
- polyllm_deepseek-0.1.0/src/polyllm_deepseek/__init__.py +3 -0
- polyllm_deepseek-0.1.0/src/polyllm_deepseek/plugin.py +52 -0
- polyllm_deepseek-0.1.0/src/polyllm_deepseek/py.typed +0 -0
- polyllm_deepseek-0.1.0/src/polyllm_deepseek.egg-info/PKG-INFO +36 -0
- polyllm_deepseek-0.1.0/src/polyllm_deepseek.egg-info/SOURCES.txt +12 -0
- polyllm_deepseek-0.1.0/src/polyllm_deepseek.egg-info/dependency_links.txt +1 -0
- polyllm_deepseek-0.1.0/src/polyllm_deepseek.egg-info/requires.txt +2 -0
- polyllm_deepseek-0.1.0/src/polyllm_deepseek.egg-info/top_level.txt +1 -0
- polyllm_deepseek-0.1.0/tests/test_deepseek.py +17 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 PolyLLM contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: polyllm-deepseek
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: DeepSeek plugin for PolyLLM.
|
|
5
|
+
Author: PolyLLM contributors
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://polyllm.raingpt.top
|
|
8
|
+
Project-URL: Repository, https://github.com/you-want/PolyLLM
|
|
9
|
+
Project-URL: Issues, https://github.com/you-want/PolyLLM/issues
|
|
10
|
+
Keywords: llm,polyllm,deepseek
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Operating System :: OS Independent
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
20
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
21
|
+
Requires-Python: >=3.10
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
License-File: LICENSE
|
|
24
|
+
Requires-Dist: polyllm-core>=0.1.0
|
|
25
|
+
Requires-Dist: polyllm-openai-compatible>=0.1.0
|
|
26
|
+
Dynamic: license-file
|
|
27
|
+
|
|
28
|
+
# PolyLLM DeepSeek Plugin for Python
|
|
29
|
+
|
|
30
|
+
```python
|
|
31
|
+
from polyllm_core import create_llm
|
|
32
|
+
from polyllm_deepseek import DeepSeekPlugin
|
|
33
|
+
|
|
34
|
+
llm = create_llm(plugins=[DeepSeekPlugin()], providers={"deepseek": {"api_key": "..."}})
|
|
35
|
+
response = await llm.chat("deepseek:deepseek-chat", messages=[{"role": "user", "content": "你好"}])
|
|
36
|
+
```
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# PolyLLM DeepSeek Plugin for Python
|
|
2
|
+
|
|
3
|
+
```python
|
|
4
|
+
from polyllm_core import create_llm
|
|
5
|
+
from polyllm_deepseek import DeepSeekPlugin
|
|
6
|
+
|
|
7
|
+
llm = create_llm(plugins=[DeepSeekPlugin()], providers={"deepseek": {"api_key": "..."}})
|
|
8
|
+
response = await llm.chat("deepseek:deepseek-chat", messages=[{"role": "user", "content": "你好"}])
|
|
9
|
+
```
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "polyllm-deepseek"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "DeepSeek plugin for PolyLLM."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
|
+
dependencies = ["polyllm-core>=0.1.0", "polyllm-openai-compatible>=0.1.0"]
|
|
12
|
+
license = "MIT"
|
|
13
|
+
license-files = ["LICENSE"]
|
|
14
|
+
authors = [{ name = "PolyLLM contributors" }]
|
|
15
|
+
keywords = ["llm", "polyllm", "deepseek"]
|
|
16
|
+
classifiers = [
|
|
17
|
+
"Development Status :: 3 - Alpha",
|
|
18
|
+
"Intended Audience :: Developers",
|
|
19
|
+
"Operating System :: OS Independent",
|
|
20
|
+
"Programming Language :: Python :: 3",
|
|
21
|
+
"Programming Language :: Python :: 3.10",
|
|
22
|
+
"Programming Language :: Python :: 3.11",
|
|
23
|
+
"Programming Language :: Python :: 3.12",
|
|
24
|
+
"Programming Language :: Python :: 3.13",
|
|
25
|
+
"Programming Language :: Python :: 3.14",
|
|
26
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
27
|
+
]
|
|
28
|
+
|
|
29
|
+
[project.urls]
|
|
30
|
+
Homepage = "https://polyllm.raingpt.top"
|
|
31
|
+
Repository = "https://github.com/you-want/PolyLLM"
|
|
32
|
+
Issues = "https://github.com/you-want/PolyLLM/issues"
|
|
33
|
+
|
|
34
|
+
[tool.setuptools.packages.find]
|
|
35
|
+
where = ["src"]
|
|
36
|
+
|
|
37
|
+
[tool.setuptools.package-data]
|
|
38
|
+
polyllm_deepseek = ["py.typed"]
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
from polyllm_core.types import ModelCapabilities, ModelSpec, NumericParamRange
|
|
2
|
+
from polyllm_openai_compatible.plugin import OpenAICompatiblePlugin, Transport
|
|
3
|
+
|
|
4
|
+
capabilities = ModelCapabilities(
|
|
5
|
+
streaming=True,
|
|
6
|
+
vision=False,
|
|
7
|
+
function_calling=True,
|
|
8
|
+
json_mode=True,
|
|
9
|
+
system_prompt=True,
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
models = (
|
|
13
|
+
ModelSpec(
|
|
14
|
+
id="deepseek-chat",
|
|
15
|
+
provider="deepseek",
|
|
16
|
+
aliases=("deepseek-v3", "chat"),
|
|
17
|
+
capabilities=capabilities,
|
|
18
|
+
params={
|
|
19
|
+
"temperature": NumericParamRange(0, 2, 1),
|
|
20
|
+
"max_tokens": NumericParamRange(1, 8192, 4096, field="max_tokens"),
|
|
21
|
+
"top_p": NumericParamRange(0, 1, 1),
|
|
22
|
+
},
|
|
23
|
+
context_window=65536,
|
|
24
|
+
max_output=8192,
|
|
25
|
+
),
|
|
26
|
+
ModelSpec(
|
|
27
|
+
id="deepseek-reasoner",
|
|
28
|
+
provider="deepseek",
|
|
29
|
+
aliases=("deepseek-r1", "reasoner"),
|
|
30
|
+
capabilities=capabilities,
|
|
31
|
+
params={"max_tokens": NumericParamRange(1, 8192, 4096, field="max_tokens")},
|
|
32
|
+
context_window=65536,
|
|
33
|
+
max_output=8192,
|
|
34
|
+
),
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class DeepSeekPlugin(OpenAICompatiblePlugin):
|
|
39
|
+
provider = "deepseek"
|
|
40
|
+
models = models
|
|
41
|
+
|
|
42
|
+
def __init__(self, transport: Transport | None = None):
|
|
43
|
+
super().__init__(transport=transport, provider="deepseek")
|
|
44
|
+
|
|
45
|
+
def create_model_spec(self, model_id: str) -> ModelSpec:
|
|
46
|
+
return ModelSpec(
|
|
47
|
+
id=model_id,
|
|
48
|
+
provider=self.provider,
|
|
49
|
+
capabilities=capabilities,
|
|
50
|
+
context_window=65536,
|
|
51
|
+
max_output=8192,
|
|
52
|
+
)
|
|
File without changes
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: polyllm-deepseek
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: DeepSeek plugin for PolyLLM.
|
|
5
|
+
Author: PolyLLM contributors
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://polyllm.raingpt.top
|
|
8
|
+
Project-URL: Repository, https://github.com/you-want/PolyLLM
|
|
9
|
+
Project-URL: Issues, https://github.com/you-want/PolyLLM/issues
|
|
10
|
+
Keywords: llm,polyllm,deepseek
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Operating System :: OS Independent
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
20
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
21
|
+
Requires-Python: >=3.10
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
License-File: LICENSE
|
|
24
|
+
Requires-Dist: polyllm-core>=0.1.0
|
|
25
|
+
Requires-Dist: polyllm-openai-compatible>=0.1.0
|
|
26
|
+
Dynamic: license-file
|
|
27
|
+
|
|
28
|
+
# PolyLLM DeepSeek Plugin for Python
|
|
29
|
+
|
|
30
|
+
```python
|
|
31
|
+
from polyllm_core import create_llm
|
|
32
|
+
from polyllm_deepseek import DeepSeekPlugin
|
|
33
|
+
|
|
34
|
+
llm = create_llm(plugins=[DeepSeekPlugin()], providers={"deepseek": {"api_key": "..."}})
|
|
35
|
+
response = await llm.chat("deepseek:deepseek-chat", messages=[{"role": "user", "content": "你好"}])
|
|
36
|
+
```
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
README.md
|
|
3
|
+
pyproject.toml
|
|
4
|
+
src/polyllm_deepseek/__init__.py
|
|
5
|
+
src/polyllm_deepseek/plugin.py
|
|
6
|
+
src/polyllm_deepseek/py.typed
|
|
7
|
+
src/polyllm_deepseek.egg-info/PKG-INFO
|
|
8
|
+
src/polyllm_deepseek.egg-info/SOURCES.txt
|
|
9
|
+
src/polyllm_deepseek.egg-info/dependency_links.txt
|
|
10
|
+
src/polyllm_deepseek.egg-info/requires.txt
|
|
11
|
+
src/polyllm_deepseek.egg-info/top_level.txt
|
|
12
|
+
tests/test_deepseek.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
polyllm_deepseek
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import unittest
|
|
2
|
+
|
|
3
|
+
from polyllm_deepseek import DeepSeekPlugin
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class DeepSeekTests(unittest.TestCase):
|
|
7
|
+
def test_models_and_dynamic_spec(self):
|
|
8
|
+
plugin = DeepSeekPlugin()
|
|
9
|
+
self.assertEqual(plugin.provider, "deepseek")
|
|
10
|
+
self.assertEqual(plugin.models[0].id, "deepseek-chat")
|
|
11
|
+
self.assertIn("chat", plugin.models[0].aliases)
|
|
12
|
+
self.assertIn("reasoner", plugin.models[1].aliases)
|
|
13
|
+
self.assertEqual(plugin.create_model_spec("deepseek-v3").provider, "deepseek")
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
if __name__ == "__main__":
|
|
17
|
+
unittest.main()
|