Skip to content

Class: DeepSeekChatWrapper ​

Defined in: chatWrappers/DeepSeekChatWrapper.ts:11

Extends ​

Constructors ​

Constructor ​

ts
new DeepSeekChatWrapper(options?: {
  keepOnlyLastThought?: boolean;
  functionCallingSyntax?: "r1-workaround" | "simplified" | "original";
  parallelFunctionCalling?: boolean;
}): DeepSeekChatWrapper;

Defined in: chatWrappers/DeepSeekChatWrapper.ts:20

Parameters ​

ParameterTypeDescription
options{ keepOnlyLastThought?: boolean; functionCallingSyntax?: "r1-workaround" | "simplified" | "original"; parallelFunctionCalling?: boolean; }-
options.keepOnlyLastThought?booleanWhether to keep only the chain of thought from the last model response. Setting this to false will keep all the chain of thoughts from the model responses in the context state. Defaults to true.
options.functionCallingSyntax?"r1-workaround" | "simplified" | "original"Use a different variation function calling syntax to improve syntax compliance. Defaults to "r1-workaround".
options.parallelFunctionCalling?booleanSupport parallel function calling. May not work well with all distill model variations, as some distillation models make unnecessary additional calls in parallel. Defaults to false.

Returns ​

DeepSeekChatWrapper

Overrides ​

ChatWrapper.constructor

Properties ​

defaultSettings ​

ts
static defaultSettings: ChatWrapperSettings;

Defined in: ChatWrapper.ts:15

Inherited from ​

ChatWrapper.defaultSettings


wrapperName ​

ts
readonly wrapperName: string = "DeepSeek";

Defined in: chatWrappers/DeepSeekChatWrapper.ts:12

Overrides ​

ChatWrapper.wrapperName


keepOnlyLastThought ​

ts
readonly keepOnlyLastThought: boolean;

Defined in: chatWrappers/DeepSeekChatWrapper.ts:14


functionCallingSyntax ​

ts
readonly functionCallingSyntax: "r1-workaround" | "simplified" | "original";

Defined in: chatWrappers/DeepSeekChatWrapper.ts:15


parallelFunctionCalling ​

ts
readonly parallelFunctionCalling: boolean;

Defined in: chatWrappers/DeepSeekChatWrapper.ts:16


settings ​

ts
readonly settings: ChatWrapperSettings;

Defined in: chatWrappers/DeepSeekChatWrapper.ts:18

Overrides ​

ChatWrapper.settings

Methods ​

generateFunctionCallsAndResults() ​

ts
generateFunctionCallsAndResults(functionCalls: ChatModelFunctionCall[], useRawCall?: boolean): LlamaText;

Defined in: ChatWrapper.ts:63

Parameters ​

ParameterTypeDefault value
functionCallsChatModelFunctionCall[]undefined
useRawCallbooleantrue

Returns ​

LlamaText

Inherited from ​

ChatWrapper.generateFunctionCallsAndResults


generateFunctionCall() ​

ts
generateFunctionCall(name: string, params: any): LlamaText;

Defined in: ChatWrapper.ts:110

Parameters ​

ParameterType
namestring
paramsany

Returns ​

LlamaText

Inherited from ​

ChatWrapper.generateFunctionCall


generateFunctionCallResult() ​

ts
generateFunctionCallResult(
   functionName: string, 
   functionParams: any, 
   result: any): LlamaText;

Defined in: ChatWrapper.ts:127

Parameters ​

ParameterType
functionNamestring
functionParamsany
resultany

Returns ​

LlamaText

Inherited from ​

ChatWrapper.generateFunctionCallResult


generateModelResponseText() ​

ts
generateModelResponseText(modelResponse: (
  | string
  | ChatModelFunctionCall
  | ChatModelSegment)[], useRawValues?: boolean): LlamaText;

Defined in: ChatWrapper.ts:158

Parameters ​

ParameterTypeDefault value
modelResponse( | string | ChatModelFunctionCall | ChatModelSegment)[]undefined
useRawValuesbooleantrue

Returns ​

LlamaText

Inherited from ​

ChatWrapper.generateModelResponseText


addAvailableFunctionsSystemMessageToHistory() ​

ts
addAvailableFunctionsSystemMessageToHistory(
   history: readonly ChatHistoryItem[], 
   availableFunctions?: ChatModelFunctions, 
   __namedParameters?: {
  documentParams?: boolean;
}): readonly ChatHistoryItem[];

Defined in: ChatWrapper.ts:269

Parameters ​

ParameterType
historyreadonly ChatHistoryItem[]
availableFunctions?ChatModelFunctions
__namedParameters?{ documentParams?: boolean; }
__namedParameters.documentParams?boolean

Returns ​

readonly ChatHistoryItem[]

Inherited from ​

ChatWrapper.addAvailableFunctionsSystemMessageToHistory


generateInitialChatHistory() ​

ts
generateInitialChatHistory(__namedParameters?: ChatWrapperGenerateInitialHistoryOptions): ChatHistoryItem[];

Defined in: ChatWrapper.ts:290

Parameters ​

ParameterType
__namedParametersChatWrapperGenerateInitialHistoryOptions

Returns ​

ChatHistoryItem[]

Inherited from ​

ChatWrapper.generateInitialChatHistory


generateContextState() ​

Defined in: chatWrappers/DeepSeekChatWrapper.ts:173

Parameters ​

ParameterType
__namedParametersChatWrapperGenerateContextStateOptions

Returns ​

ChatWrapperGeneratedContextState

Overrides ​

ChatWrapper.generateContextState


generateAvailableFunctionsSystemText() ​

ts
generateAvailableFunctionsSystemText(availableFunctions: ChatModelFunctions, __namedParameters: {
  documentParams?: boolean;
}): LlamaText;

Defined in: chatWrappers/DeepSeekChatWrapper.ts:230

Parameters ​

ParameterType
availableFunctionsChatModelFunctions
__namedParameters{ documentParams?: boolean; }
__namedParameters.documentParams?boolean

Returns ​

LlamaText

Overrides ​

ChatWrapper.generateAvailableFunctionsSystemText