deepdoc-lib 0.2.4__tar.gz → 0.2.5__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.
Files changed (93) hide show
  1. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/.env.example +1 -1
  2. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/.github/workflows/ci.yml +18 -5
  3. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/PKG-INFO +11 -2
  4. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/README.md +8 -0
  5. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/_version.py +3 -3
  6. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/depend/simple_cv_model.py +22 -7
  7. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc_lib.egg-info/PKG-INFO +11 -2
  8. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc_lib.egg-info/requires.txt +3 -1
  9. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc_lib.egg-info/scm_file_list.json +1 -0
  10. deepdoc_lib-0.2.5/deepdoc_lib.egg-info/scm_version.json +8 -0
  11. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/pyproject.toml +1 -1
  12. deepdoc_lib-0.2.4/deepdoc_lib.egg-info/scm_version.json +0 -8
  13. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/.github/workflows/publish.yml +0 -0
  14. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/LICENSE +0 -0
  15. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/MANIFEST.in +0 -0
  16. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/UPSTREAM_SYNC.md +0 -0
  17. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/README.md +0 -0
  18. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/README_zh.md +0 -0
  19. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/__init__.py +0 -0
  20. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/common/__init__.py +0 -0
  21. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/common/config_utils.py +0 -0
  22. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/common/connection_utils.py +0 -0
  23. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/common/file_utils.py +0 -0
  24. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/common/misc_utils.py +0 -0
  25. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/common/model_store.py +0 -0
  26. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/common/settings.py +0 -0
  27. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/common/tiktoken_cache.py +0 -0
  28. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/common/token_utils.py +0 -0
  29. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/config.py +0 -0
  30. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/depend/find_codec.py +0 -0
  31. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/depend/nltk_manager.py +0 -0
  32. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/depend/prompts/vision_llm_describe_prompt.md +0 -0
  33. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/depend/prompts/vision_llm_figure_describe_prompt.md +0 -0
  34. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/depend/prompts.py +0 -0
  35. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/depend/rag_tokenizer.py +0 -0
  36. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/depend/surname.py +0 -0
  37. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/depend/timeout.py +0 -0
  38. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/depend/vision_llm_chunk.py +0 -0
  39. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/dict/README.md +0 -0
  40. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/dict/huqie.txt +0 -0
  41. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/download_models.py +0 -0
  42. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/llm_adapter/__init__.py +0 -0
  43. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/llm_adapter/adapter.py +0 -0
  44. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/llm_adapter/utils.py +0 -0
  45. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/llm_adapter/vision.py +0 -0
  46. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/parser/__init__.py +0 -0
  47. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/parser/docling_parser.py +0 -0
  48. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/parser/docx_parser.py +0 -0
  49. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/parser/epub_parser.py +0 -0
  50. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/parser/excel_parser.py +0 -0
  51. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/parser/figure_parser.py +0 -0
  52. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/parser/html_parser.py +0 -0
  53. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/parser/json_parser.py +0 -0
  54. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/parser/markdown_parser.py +0 -0
  55. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/parser/mineru_parser.py +0 -0
  56. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/parser/pdf_parser.py +0 -0
  57. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/parser/ppt_parser.py +0 -0
  58. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/parser/resume/__init__.py +0 -0
  59. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/parser/resume/entities/__init__.py +0 -0
  60. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/parser/resume/entities/corporations.py +0 -0
  61. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/parser/resume/entities/degrees.py +0 -0
  62. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/parser/resume/entities/industries.py +0 -0
  63. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/parser/resume/entities/regions.py +0 -0
  64. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/parser/resume/entities/res/corp.tks.freq.json +0 -0
  65. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/parser/resume/entities/res/corp_baike_len.csv +0 -0
  66. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/parser/resume/entities/res/corp_tag.json +0 -0
  67. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/parser/resume/entities/res/good_corp.json +0 -0
  68. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/parser/resume/entities/res/good_sch.json +0 -0
  69. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/parser/resume/entities/res/school.rank.csv +0 -0
  70. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/parser/resume/entities/res/schools.csv +0 -0
  71. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/parser/resume/entities/schools.py +0 -0
  72. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/parser/resume/step_one.py +0 -0
  73. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/parser/resume/step_two.py +0 -0
  74. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/parser/tcadp_parser.py +0 -0
  75. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/parser/txt_parser.py +0 -0
  76. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/parser/utils.py +0 -0
  77. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/vision/__init__.py +0 -0
  78. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/vision/layout_recognizer.py +0 -0
  79. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/vision/ocr.py +0 -0
  80. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/vision/operators.py +0 -0
  81. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/vision/postprocess.py +0 -0
  82. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/vision/recognizer.py +0 -0
  83. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/vision/seeit.py +0 -0
  84. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/vision/t_ocr.py +0 -0
  85. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/vision/t_recognizer.py +0 -0
  86. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc/vision/table_structure_recognizer.py +0 -0
  87. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc_config.example.yaml +0 -0
  88. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc_lib.egg-info/SOURCES.txt +0 -0
  89. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc_lib.egg-info/dependency_links.txt +0 -0
  90. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc_lib.egg-info/entry_points.txt +0 -0
  91. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/deepdoc_lib.egg-info/top_level.txt +0 -0
  92. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/scripts/download_models.py +0 -0
  93. {deepdoc_lib-0.2.4 → deepdoc_lib-0.2.5}/setup.cfg +0 -0
@@ -29,7 +29,7 @@ DEEPDOC_VISION_BASE_URL=
29
29
  # openai - OpenAI GPT-4 Vision
30
30
  # qwen - 阿里云通义千问
31
31
  # zhipu - 智谱AI
32
- # gemini - Google Gemini
32
+ # gemini - Google Gemini (需安装: pip install deepdoc-lib[gemini])
33
33
  # ollama - 本地 Ollama 服务
34
34
  # anthropic - Anthropic Claude (需额外配置)
35
35
  DEEPDOC_VISION_PROVIDER=qwen
@@ -22,6 +22,8 @@ jobs:
22
22
  python-version: ${{ matrix.python-version }}
23
23
  cache: "pip"
24
24
 
25
+ # Install without extras so the suite proves the default install
26
+ # imports and works without optional SDKs such as google-genai.
25
27
  - name: Install dependencies
26
28
  run: |
27
29
  python -m pip install --upgrade pip
@@ -33,6 +35,12 @@ jobs:
33
35
  python -m build --wheel
34
36
  python -m pip install --dry-run --ignore-installed dist/*.whl 'PyJWT[crypto]>=2.15.1,<3'
35
37
 
38
+ - name: Resolve the built wheel with protobuf 6
39
+ run: |
40
+ wheel=$(ls dist/*.whl)
41
+ python -m pip install --dry-run --ignore-installed "$wheel" 'protobuf>=6.31,<7'
42
+ python -m pip install --dry-run --ignore-installed "${wheel}[gemini]" 'protobuf>=6.31,<7'
43
+
36
44
  # Preprovision immutable official data instead of asking the NLTK
37
45
  # downloader to traverse the runner's proxy. Do not disable pathsec.
38
46
  - name: Check out pinned NLTK test resources
@@ -67,6 +75,11 @@ jobs:
67
75
  NLTK_DATA: ${{ runner.temp }}/deepdoc-nltk-data
68
76
  run: python -m pytest tests
69
77
 
78
+ - name: Test Gemini with the latest google-genai
79
+ run: |
80
+ python -m pip install -e ".[gemini]"
81
+ python -m pytest tests/test_gemini_sdk_compatibility.py
82
+
70
83
  minimum-sdk:
71
84
  name: Minimum SDK contract (3.10)
72
85
  runs-on: ubuntu-latest
@@ -79,14 +92,14 @@ jobs:
79
92
  python-version: "3.10"
80
93
  cache: "pip"
81
94
 
82
- - name: Build and resolve the wheel with the minimum SDK and current PyJWT
95
+ - name: Build and resolve the wheel with the minimum SDKs and current PyJWT
83
96
  run: |
84
97
  python -m pip install --upgrade pip build
85
98
  python -m build --wheel
86
- python -m pip install --dry-run --ignore-installed dist/*.whl 'zai-sdk==0.0.4' 'PyJWT[crypto]>=2.15.1,<3'
99
+ python -m pip install --dry-run --ignore-installed dist/*.whl 'zai-sdk==0.0.4' 'google-genai==1.0.0' 'PyJWT[crypto]>=2.15.1,<3'
87
100
 
88
- - name: Install and test the minimum SDK contract
101
+ - name: Install and test the minimum SDK contracts
89
102
  run: |
90
- python -m pip install dist/*.whl 'zai-sdk==0.0.4' 'PyJWT[crypto]>=2.15.1,<3' pytest
103
+ python -m pip install dist/*.whl 'zai-sdk==0.0.4' 'google-genai==1.0.0' 'PyJWT[crypto]>=2.15.1,<3' pytest
91
104
  python -m pip check
92
- python -m pytest tests/test_zhipu_sdk_compatibility.py
105
+ python -m pytest tests/test_zhipu_sdk_compatibility.py tests/test_gemini_sdk_compatibility.py
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: deepdoc_lib
3
- Version: 0.2.4
3
+ Version: 0.2.5
4
4
  Summary: [RAGFlow](https://ragflow.io/) is an open-source RAG (Retrieval-Augmented Generation) engine based on deep document understanding. It offers a streamlined RAG workflow for businesses of any scale, combining LLM (Large Language Models) to provide truthful question-answering capabilities, backed by well-founded citations from various complex formatted data.
5
5
  Author-email: Zhichang Yu <yuzhichang@gmail.com>
6
6
  Requires-Python: <3.14,>=3.10
@@ -43,13 +43,14 @@ Requires-Dist: tiktoken>=0.7.0
43
43
  Requires-Dist: xgboost<3.0.0,>=2.1.0
44
44
  Requires-Dist: xpinyin>=0.7.6
45
45
  Requires-Dist: zai-sdk>=0.0.4
46
- Requires-Dist: google-generativeai<0.9.0,>=0.8.1
47
46
  Requires-Dist: trio>=0.29.0
48
47
  Requires-Dist: setuptools<76.0.0,>=75.2.0
49
48
  Requires-Dist: huggingface-hub<1.0.0,>=0.25.0
50
49
  Provides-Extra: gpu
51
50
  Requires-Dist: onnxruntime-gpu>=1.19.2; (sys_platform != "darwin" and platform_machine == "x86_64") and extra == "gpu"
52
51
  Requires-Dist: torch; extra == "gpu"
52
+ Provides-Extra: gemini
53
+ Requires-Dist: google-genai>=1.0.0; extra == "gemini"
53
54
  Dynamic: license-file
54
55
 
55
56
  # Deepdoc
@@ -68,6 +69,12 @@ GPU (Linux x86_64 only):
68
69
  pip install deepdoc-lib[gpu]
69
70
  ```
70
71
 
72
+ Gemini vision provider (optional, installs the `google-genai` SDK):
73
+
74
+ ```bash
75
+ pip install deepdoc-lib[gemini]
76
+ ```
77
+
71
78
  Note: `onnxruntime` (CPU) and `onnxruntime-gpu` should not be installed together. If you're switching an existing environment to GPU, uninstall CPU ORT first:
72
79
 
73
80
  ```bash
@@ -222,6 +229,8 @@ vision_model = create_vision_model("qwen")
222
229
 
223
230
  Supported providers: ["openai", "qwen", "zhipu", "ollama", "gemini", "anthropic"]
224
231
 
232
+ The `gemini` provider needs the `gemini` extra: `pip install deepdoc-lib[gemini]`.
233
+
225
234
  - Use Configuration File
226
235
 
227
236
  Create `deepdoc_config.yaml`:
@@ -14,6 +14,12 @@ GPU (Linux x86_64 only):
14
14
  pip install deepdoc-lib[gpu]
15
15
  ```
16
16
 
17
+ Gemini vision provider (optional, installs the `google-genai` SDK):
18
+
19
+ ```bash
20
+ pip install deepdoc-lib[gemini]
21
+ ```
22
+
17
23
  Note: `onnxruntime` (CPU) and `onnxruntime-gpu` should not be installed together. If you're switching an existing environment to GPU, uninstall CPU ORT first:
18
24
 
19
25
  ```bash
@@ -168,6 +174,8 @@ vision_model = create_vision_model("qwen")
168
174
 
169
175
  Supported providers: ["openai", "qwen", "zhipu", "ollama", "gemini", "anthropic"]
170
176
 
177
+ The `gemini` provider needs the `gemini` extra: `pip install deepdoc-lib[gemini]`.
178
+
171
179
  - Use Configuration File
172
180
 
173
181
  Create `deepdoc_config.yaml`:
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
18
18
  commit_id: str | None
19
19
  __commit_id__: str | None
20
20
 
21
- __version__ = version = '0.2.4'
22
- __version_tuple__ = version_tuple = (0, 2, 4)
21
+ __version__ = version = '0.2.5'
22
+ __version_tuple__ = version_tuple = (0, 2, 5)
23
23
 
24
- __commit_id__ = commit_id = 'g7403fae36'
24
+ __commit_id__ = commit_id = 'g8ef70a65b'
@@ -306,9 +306,16 @@ class GeminiCV(Base):
306
306
 
307
307
  def __init__(self, key, model_name="gemini-pro-vision", lang="Chinese", **kwargs):
308
308
  super().__init__(key, model_name, lang)
309
- import google.generativeai as genai
310
- genai.configure(api_key=key)
311
- self.model = genai.GenerativeModel(model_name)
309
+ # The legacy google-generativeai SDK caps protobuf below 6, so Gemini
310
+ # uses the maintained google-genai SDK as an optional extra instead.
311
+ try:
312
+ from google import genai
313
+ except ImportError as e:
314
+ raise ImportError(
315
+ "Gemini vision requires the google-genai package. "
316
+ "Install it with: pip install 'deepdoc-lib[gemini]'"
317
+ ) from e
318
+ self.client = genai.Client(api_key=key)
312
319
 
313
320
  def describe_with_prompt(self, image, prompt=None):
314
321
  """使用Google Gemini模型描述图片"""
@@ -323,11 +330,19 @@ class GeminiCV(Base):
323
330
 
324
331
  pil_image = Image.open(BytesIO(img_data))
325
332
 
326
- response = self.model.generate_content([
327
- prompt or self.prompt(image),
328
- pil_image
329
- ])
333
+ response = self.client.models.generate_content(
334
+ model=self.model_name,
335
+ contents=[prompt or self.prompt(image), pil_image],
336
+ )
330
337
 
338
+ # google-genai returns None (the legacy SDK raised) when the
339
+ # response has no text, e.g. a safety block; keep the error path.
340
+ # A block can be reported on the prompt or on the candidate.
341
+ if response.text is None:
342
+ candidates = response.candidates or []
343
+ finish_reason = candidates[0].finish_reason if candidates else None
344
+ finish_reason = getattr(finish_reason, "name", finish_reason)
345
+ raise ValueError(f"Gemini returned no text (finish_reason={finish_reason}, prompt_feedback={response.prompt_feedback})")
331
346
  return response.text.strip()
332
347
  except Exception as e:
333
348
  return "**ERROR**: " + str(e)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: deepdoc_lib
3
- Version: 0.2.4
3
+ Version: 0.2.5
4
4
  Summary: [RAGFlow](https://ragflow.io/) is an open-source RAG (Retrieval-Augmented Generation) engine based on deep document understanding. It offers a streamlined RAG workflow for businesses of any scale, combining LLM (Large Language Models) to provide truthful question-answering capabilities, backed by well-founded citations from various complex formatted data.
5
5
  Author-email: Zhichang Yu <yuzhichang@gmail.com>
6
6
  Requires-Python: <3.14,>=3.10
@@ -43,13 +43,14 @@ Requires-Dist: tiktoken>=0.7.0
43
43
  Requires-Dist: xgboost<3.0.0,>=2.1.0
44
44
  Requires-Dist: xpinyin>=0.7.6
45
45
  Requires-Dist: zai-sdk>=0.0.4
46
- Requires-Dist: google-generativeai<0.9.0,>=0.8.1
47
46
  Requires-Dist: trio>=0.29.0
48
47
  Requires-Dist: setuptools<76.0.0,>=75.2.0
49
48
  Requires-Dist: huggingface-hub<1.0.0,>=0.25.0
50
49
  Provides-Extra: gpu
51
50
  Requires-Dist: onnxruntime-gpu>=1.19.2; (sys_platform != "darwin" and platform_machine == "x86_64") and extra == "gpu"
52
51
  Requires-Dist: torch; extra == "gpu"
52
+ Provides-Extra: gemini
53
+ Requires-Dist: google-genai>=1.0.0; extra == "gemini"
53
54
  Dynamic: license-file
54
55
 
55
56
  # Deepdoc
@@ -68,6 +69,12 @@ GPU (Linux x86_64 only):
68
69
  pip install deepdoc-lib[gpu]
69
70
  ```
70
71
 
72
+ Gemini vision provider (optional, installs the `google-genai` SDK):
73
+
74
+ ```bash
75
+ pip install deepdoc-lib[gemini]
76
+ ```
77
+
71
78
  Note: `onnxruntime` (CPU) and `onnxruntime-gpu` should not be installed together. If you're switching an existing environment to GPU, uninstall CPU ORT first:
72
79
 
73
80
  ```bash
@@ -222,6 +229,8 @@ vision_model = create_vision_model("qwen")
222
229
 
223
230
  Supported providers: ["openai", "qwen", "zhipu", "ollama", "gemini", "anthropic"]
224
231
 
232
+ The `gemini` provider needs the `gemini` extra: `pip install deepdoc-lib[gemini]`.
233
+
225
234
  - Use Configuration File
226
235
 
227
236
  Create `deepdoc_config.yaml`:
@@ -35,11 +35,13 @@ tiktoken>=0.7.0
35
35
  xgboost<3.0.0,>=2.1.0
36
36
  xpinyin>=0.7.6
37
37
  zai-sdk>=0.0.4
38
- google-generativeai<0.9.0,>=0.8.1
39
38
  trio>=0.29.0
40
39
  setuptools<76.0.0,>=75.2.0
41
40
  huggingface-hub<1.0.0,>=0.25.0
42
41
 
42
+ [gemini]
43
+ google-genai>=1.0.0
44
+
43
45
  [gpu]
44
46
  torch
45
47
 
@@ -102,6 +102,7 @@
102
102
  "tests/test_data/test5.csv",
103
103
  "tests/test_data/test_gbk.txt",
104
104
  "tests/test_data/test_html.csv",
105
+ "tests/test_gemini_sdk_compatibility.py",
105
106
  "tests/test_model_store.py",
106
107
  "tests/test_parser.py",
107
108
  "tests/test_real_files.py",
@@ -0,0 +1,8 @@
1
+ {
2
+ "tag": "0.2.5",
3
+ "distance": 0,
4
+ "node": "g8ef70a65b970bf74e5fffbd15ba7d111fd5a24f5",
5
+ "dirty": false,
6
+ "branch": "HEAD",
7
+ "node_date": "2026-11-09"
8
+ }
@@ -48,7 +48,6 @@ dependencies = [
48
48
  "xgboost>=2.1.0,<3.0.0",
49
49
  "xpinyin>=0.7.6",
50
50
  "zai-sdk>=0.0.4",
51
- "google-generativeai>=0.8.1,<0.9.0",
52
51
  "trio>=0.29.0",
53
52
  "setuptools>=75.2.0,<76.0.0",
54
53
  "huggingface-hub>=0.25.0,<1.0.0",
@@ -59,6 +58,7 @@ gpu = [
59
58
  "onnxruntime-gpu>=1.19.2; sys_platform != 'darwin' and platform_machine == 'x86_64'",
60
59
  "torch",
61
60
  ]
61
+ gemini = ["google-genai>=1.0.0"]
62
62
 
63
63
  [project.scripts]
64
64
  deepdoc-download-models = "deepdoc.download_models:main"
@@ -1,8 +0,0 @@
1
- {
2
- "tag": "0.2.4",
3
- "distance": 0,
4
- "node": "g7403fae3679433d12d3c7cc805d8792247f99747",
5
- "dirty": false,
6
- "branch": "HEAD",
7
- "node_date": "2026-10-17"
8
- }
File without changes
File without changes
File without changes