Defined in: packages/integrations/src/model-provider/deepseek/index.ts:38
DeepSeek model provider: OpenAICompatible set up for the DeepSeek API.
Ports:
prompt(in): a text prompt. The answer is sent oncompletion.messages(in): a list of chat messages. The reply is sent onmessage.
Extends
Constructors
Constructor
new Deepseek(config): Deepseek;
Defined in: packages/integrations/src/model-provider/deepseek/index.ts:39
Parameters
| Parameter | Type |
|---|---|
config |
DeepseekConfig |
Returns
Deepseek
Overrides
Properties
| Property | Modifier | Type | Description | Inherited from | Defined in |
|---|---|---|---|---|---|
closesWithInputs |
readonly |
boolean |
Whether the node closes its outputs once all its inputs have ended (RFC 0001), so the end of a stream travels on. A node that keeps producing after its inputs end (a timer) overrides it with false and closes its outputs itself. |
OpenAICompatible.closesWithInputs |
node_modules/.pnpm/@hlang-org+runtime@2.1.0_rxjs@7.8.2/node_modules/@hlang-org/runtime/lib/index.d.ts:204 |
I |
readonly |
PortAccessor |
Resolves an input port. Bound to the node, so it can be passed around as $i. |
OpenAICompatible.I |
node_modules/.pnpm/@hlang-org+runtime@2.1.0_rxjs@7.8.2/node_modules/@hlang-org/runtime/lib/index.d.ts:167 |
id |
readonly |
string |
- | OpenAICompatible.id |
node_modules/.pnpm/@hlang-org+runtime@2.1.0_rxjs@7.8.2/node_modules/@hlang-org/runtime/lib/index.d.ts:163 |
identity |
readonly |
symbol |
- | OpenAICompatible.identity |
node_modules/.pnpm/@hlang-org+runtime@2.1.0_rxjs@7.8.2/node_modules/@hlang-org/runtime/lib/index.d.ts:164 |
inPort |
protected readonly |
Port |
The default in input port. |
OpenAICompatible.inPort |
packages/core/dist/component/index.d.ts:51 |
O |
readonly |
PortAccessor |
Resolves an output port. Bound to the node, so it can be passed around as $o. |
OpenAICompatible.O |
node_modules/.pnpm/@hlang-org+runtime@2.1.0_rxjs@7.8.2/node_modules/@hlang-org/runtime/lib/index.d.ts:169 |
opts |
public |
object |
- | OpenAICompatible.opts |
node_modules/.pnpm/@hlang-org+runtime@2.1.0_rxjs@7.8.2/node_modules/@hlang-org/runtime/lib/index.d.ts:165 |
outPort |
protected readonly |
Port |
The default out output port. A pipeline uses it to infer the endpoint. |
OpenAICompatible.outPort |
packages/core/dist/component/index.d.ts:53 |
type |
readonly |
typeof TRANSFORM |
- | OpenAICompatible.type |
node_modules/.pnpm/@hlang-org+runtime@2.1.0_rxjs@7.8.2/node_modules/@hlang-org/runtime/lib/index.d.ts:197 |
Port |
static |
typeof Port |
Port factory from the HLang runtime. Component.Port.I(name) and Component.Port.O(name) create input and output ports; call .attach(this) in the constructor. |
OpenAICompatible.Port |
packages/core/dist/component/index.d.ts:49 |
Methods
_transform()
_transform($i, $o): void;
Defined in: packages/integrations/src/model-provider/openai-compatible/index.ts:461
Connects the prompt and messages input ports to the model.
API errors produce a fallback value so the pipeline keeps flowing. Input of the wrong
type fails the pipeline run with a TypeError before the API is called.
Parameters
| Parameter | Type |
|---|---|
$i |
Port |
$o |
Port |
Returns
void
Inherited from
chatCompletion()
chatCompletion(messages, options?): Promise<DeepseekAssistantMessage>;
Defined in: packages/integrations/src/model-provider/openai-compatible/index.ts:362
Sends a conversation and returns the assistant reply.
Parameters
| Parameter | Type |
|---|---|
messages |
DeepseekMessage[] |
options? |
DeepseekChatCompletionOptions |
Returns
Promise<DeepseekAssistantMessage>
Inherited from
OpenAICompatible.chatCompletion
E()
E(): Port;
Defined in: node_modules/.pnpm/@hlang-org+runtime@2.1.0_rxjs@7.8.2/node_modules/@hlang-org/runtime/lib/index.d.ts:208
The error output (@node/error); Readable and Transform nodes have one.
Returns
Port
Inherited from
generateCompletion()
generateCompletion(prompt): Promise<string>;
Defined in: packages/integrations/src/model-provider/openai-compatible/index.ts:345
Generates a completion for a single prompt.
Parameters
| Parameter | Type |
|---|---|
prompt |
string |
Returns
Promise<string>
The text answer, or the JSON-encoded assistant message when it contains tool calls.
Inherited from
OpenAICompatible.generateCompletion
run()
run(input): Promise<
| string
| DeepseekAssistantMessage>;
Defined in: packages/integrations/src/model-provider/openai-compatible/index.ts:452
Runs the model outside a pipeline.
Parameters
| Parameter | Type | Description |
|---|---|---|
input |
string | DeepseekMessage[] |
A prompt string or a list of messages. |
Returns
Promise<
| string
| DeepseekAssistantMessage>
Inherited from
streamChatCompletion()
streamChatCompletion(messages, options?): AsyncGenerator<DeepseekStreamChunk>;
Defined in: packages/integrations/src/model-provider/openai-compatible/index.ts:404
Streams the assistant reply. Each chunk holds a text delta, tool-call deltas, or usage.
Parameters
| Parameter | Type |
|---|---|
messages |
DeepseekMessage[] |
options? |
DeepseekChatCompletionOptions |
Returns
AsyncGenerator<DeepseekStreamChunk>
Inherited from
OpenAICompatible.streamChatCompletion
throw()
throw(error): void;
Defined in: node_modules/.pnpm/@hlang-org+runtime@2.1.0_rxjs@7.8.2/node_modules/@hlang-org/runtime/lib/index.d.ts:207
Sends error on the error output.
Parameters
| Parameter | Type |
|---|---|
error |
unknown |
Returns
void