@molecule/api-ai-deepseek 1.0.5 → 1.0.6
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.
- package/README.md +21 -1
- package/dist/index.d.ts +19 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +19 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@ AUTO-GENERATED — DO NOT EDIT THIS FILE.
|
|
|
3
3
|
Generated by `mlcl sync-docs` from the package's src/index.ts JSDoc + mlcl/registry.json.
|
|
4
4
|
Edits here are overwritten on the next commit (molecule's pre-commit hook regenerates).
|
|
5
5
|
To change this document, edit the module-level JSDoc in src/index.ts.
|
|
6
|
-
Generated: 2026-
|
|
6
|
+
Generated: 2026-10-01T18:20:44.372Z
|
|
7
7
|
-->
|
|
8
8
|
|
|
9
9
|
# @molecule/api-ai-deepseek
|
|
@@ -14,6 +14,26 @@ Generated: 2026-08-04T01:47:29.897Z
|
|
|
14
14
|
|
|
15
15
|
DeepSeek AI provider for molecule.dev.
|
|
16
16
|
|
|
17
|
+
## Quick Start
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
// npm install @molecule/api-ai-deepseek --workspace=api
|
|
21
|
+
import { setProvider, requireProvider } from '@molecule/api-ai'
|
|
22
|
+
import { provider } from '@molecule/api-ai-deepseek'
|
|
23
|
+
|
|
24
|
+
// Named registration — several AI providers can be bonded side by side
|
|
25
|
+
// (getProviderByName('deepseek') targets this one); the FIRST one
|
|
26
|
+
// registered also answers requireProvider() (see @molecule/api-ai).
|
|
27
|
+
setProvider('deepseek', provider) // reads DEEPSEEK_API_KEY from the environment
|
|
28
|
+
|
|
29
|
+
let reply = ''
|
|
30
|
+
for await (const event of requireProvider().chat({
|
|
31
|
+
messages: [{ role: 'user', content: 'Hello!' }],
|
|
32
|
+
})) {
|
|
33
|
+
if (event.type === 'text') reply += event.content // or forward the chunk to the client (SSE)
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
17
37
|
## Type
|
|
18
38
|
|
|
19
39
|
`provider`
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,25 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* DeepSeek AI provider for molecule.dev.
|
|
3
3
|
*
|
|
4
|
+
* @example
|
|
5
|
+
* ```typescript
|
|
6
|
+
* // npm install @molecule/api-ai-deepseek --workspace=api
|
|
7
|
+
* import { setProvider, requireProvider } from '@molecule/api-ai'
|
|
8
|
+
* import { provider } from '@molecule/api-ai-deepseek'
|
|
9
|
+
*
|
|
10
|
+
* // Named registration — several AI providers can be bonded side by side
|
|
11
|
+
* // (getProviderByName('deepseek') targets this one); the FIRST one
|
|
12
|
+
* // registered also answers requireProvider() (see @molecule/api-ai).
|
|
13
|
+
* setProvider('deepseek', provider) // reads DEEPSEEK_API_KEY from the environment
|
|
14
|
+
*
|
|
15
|
+
* let reply = ''
|
|
16
|
+
* for await (const event of requireProvider().chat({
|
|
17
|
+
* messages: [{ role: 'user', content: 'Hello!' }],
|
|
18
|
+
* })) {
|
|
19
|
+
* if (event.type === 'text') reply += event.content // or forward the chunk to the client (SSE)
|
|
20
|
+
* }
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
4
23
|
* @remarks
|
|
5
24
|
* Config: `DEEPSEEK_API_KEY` (SERVER-side only) plus an optional default model id/base URL.
|
|
6
25
|
*
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,cAAc,oBAAoB,CAAA;AAClC,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA;AAC5B,cAAc,YAAY,CAAA;AAE1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAMlD;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,UAUrB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,25 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* DeepSeek AI provider for molecule.dev.
|
|
3
3
|
*
|
|
4
|
+
* @example
|
|
5
|
+
* ```typescript
|
|
6
|
+
* // npm install @molecule/api-ai-deepseek --workspace=api
|
|
7
|
+
* import { setProvider, requireProvider } from '@molecule/api-ai'
|
|
8
|
+
* import { provider } from '@molecule/api-ai-deepseek'
|
|
9
|
+
*
|
|
10
|
+
* // Named registration — several AI providers can be bonded side by side
|
|
11
|
+
* // (getProviderByName('deepseek') targets this one); the FIRST one
|
|
12
|
+
* // registered also answers requireProvider() (see @molecule/api-ai).
|
|
13
|
+
* setProvider('deepseek', provider) // reads DEEPSEEK_API_KEY from the environment
|
|
14
|
+
*
|
|
15
|
+
* let reply = ''
|
|
16
|
+
* for await (const event of requireProvider().chat({
|
|
17
|
+
* messages: [{ role: 'user', content: 'Hello!' }],
|
|
18
|
+
* })) {
|
|
19
|
+
* if (event.type === 'text') reply += event.content // or forward the chunk to the client (SSE)
|
|
20
|
+
* }
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
4
23
|
* @remarks
|
|
5
24
|
* Config: `DEEPSEEK_API_KEY` (SERVER-side only) plus an optional default model id/base URL.
|
|
6
25
|
*
|