oc_chat
Loading...
Searching...
No Matches
__init__.py
Go to the documentation of this file.
1
#!/usr/bin/env python3
2
# -*- coding: utf-8 -*-
3
# providers/deepseek/__init__.py
4
5
"""
6
DeepSeek provider bundle.
7
8
Purpose
9
-------
10
Importing this package registers :class:`DeepSeekProvider` into the
11
module-level registry at ``oc_chat.core.provider_plugin.registry``.
12
The rest of the app then retrieves it via ``registry.get("deepseek")``.
13
14
Responsibilities
15
----------------
16
- Self-register :class:`DeepSeekProvider` on import (Phase C.1c
17
contract).
18
- Re-export :class:`DeepSeekProvider` for direct access.
19
20
Diagnostics
21
-----------
22
Domain: OC_CHAT.CLIENT
23
Levels:
24
L2 — lifecycle events
25
L3 — semantic details
26
L4 — deep tracing
27
28
Contracts
29
---------
30
- Side effect on import: ``DeepSeekProvider.register()`` runs once.
31
Repeated imports are idempotent (the registry detects same-name +
32
same-class registrations and skips silently).
33
- ``__all__`` deliberately exposes only the provider class — bundle
34
internals (``client``, ``models``, ``cache_usage``) are private to
35
the bundle.
36
37
Dependencies
38
------------
39
- oc_diagnostics (structured debug logging via _dbg)
40
- providers.deepseek.provider (DeepSeekProvider, registered on import and re-exported)
41
"""
42
from
oc_diagnostics
import
_dbg
43
44
from
.provider
import
DeepSeekProvider
45
46
# Self-register on import (Phase C.1c contract).
47
DeepSeekProvider.register()
48
49
_dbg(
"OC_CHAT.CLIENT"
,
"module"
,
"loaded"
, 4)
50
51
__all__ = [
"DeepSeekProvider"
]
providers
deepseek
__init__.py
Generated by
1.15.0