Class: QwenChatWrapper 
Defined in: chatWrappers/QwenChatWrapper.ts:12
Extends 
Constructors 
Constructor 
new QwenChatWrapper(options: {
  keepOnlyLastThought?: boolean;
  thoughts?: "auto" | "discourage";
}): QwenChatWrapper;Defined in: chatWrappers/QwenChatWrapper.ts:20
Parameters 
| Parameter | Type | Description | 
|---|---|---|
options | { keepOnlyLastThought?: boolean; thoughts?: "auto" | "discourage"; } | - | 
options.keepOnlyLastThought? | boolean | Whether 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.thoughts? | "auto" | "discourage" | Control the usage of thoughts in the model responses. Defaults to "auto". | 
Returns 
QwenChatWrapper
Overrides 
Properties 
defaultSettings 
static defaultSettings: ChatWrapperSettings;Defined in: ChatWrapper.ts:14
Inherited from 
wrapperName 
readonly wrapperName: string = "Qwen";Defined in: chatWrappers/QwenChatWrapper.ts:13
Overrides 
keepOnlyLastThought 
readonly keepOnlyLastThought: boolean;Defined in: chatWrappers/QwenChatWrapper.ts:15
thoughts 
readonly thoughts: "auto" | "discourage";Defined in: chatWrappers/QwenChatWrapper.ts:16
settings 
readonly settings: ChatWrapperSettings;Defined in: chatWrappers/QwenChatWrapper.ts:18
Overrides 
Methods 
generateFunctionCallsAndResults() 
generateFunctionCallsAndResults(functionCalls: ChatModelFunctionCall[], useRawCall: boolean): LlamaText;Defined in: ChatWrapper.ts:60
Parameters 
| Parameter | Type | Default value | 
|---|---|---|
functionCalls | ChatModelFunctionCall[] | undefined | 
useRawCall | boolean | true | 
Returns 
Inherited from 
ChatWrapper.generateFunctionCallsAndResults
generateFunctionCall() 
generateFunctionCall(name: string, params: any): LlamaText;Defined in: ChatWrapper.ts:107
Parameters 
| Parameter | Type | 
|---|---|
name | string | 
params | any | 
Returns 
Inherited from 
ChatWrapper.generateFunctionCall
generateFunctionCallResult() 
generateFunctionCallResult(
   functionName: string, 
   functionParams: any, 
   result: any): LlamaText;Defined in: ChatWrapper.ts:124
Parameters 
| Parameter | Type | 
|---|---|
functionName | string | 
functionParams | any | 
result | any | 
Returns 
Inherited from 
ChatWrapper.generateFunctionCallResult
generateModelResponseText() 
generateModelResponseText(modelResponse: (
  | string
  | ChatModelFunctionCall
  | ChatModelSegment)[], useRawValues: boolean): LlamaText;Defined in: ChatWrapper.ts:148
Parameters 
| Parameter | Type | Default value | 
|---|---|---|
modelResponse | ( | string | ChatModelFunctionCall | ChatModelSegment)[] | undefined | 
useRawValues | boolean | true | 
Returns 
Inherited from 
ChatWrapper.generateModelResponseText
addAvailableFunctionsSystemMessageToHistory() 
addAvailableFunctionsSystemMessageToHistory(
   history: readonly ChatHistoryItem[], 
   availableFunctions?: ChatModelFunctions, 
   __namedParameters?: {
  documentParams?: boolean;
}): readonly ChatHistoryItem[];Defined in: ChatWrapper.ts:257
Parameters 
| Parameter | Type | 
|---|---|
history | readonly ChatHistoryItem[] | 
availableFunctions? | ChatModelFunctions | 
__namedParameters? | { documentParams?: boolean; } | 
__namedParameters.documentParams? | boolean | 
Returns 
readonly ChatHistoryItem[]
Inherited from 
ChatWrapper.addAvailableFunctionsSystemMessageToHistory
generateInitialChatHistory() 
generateInitialChatHistory(__namedParameters: ChatWrapperGenerateInitialHistoryOptions): ChatHistoryItem[];Defined in: ChatWrapper.ts:278
Parameters 
| Parameter | Type | 
|---|---|
__namedParameters | ChatWrapperGenerateInitialHistoryOptions | 
Returns 
Inherited from 
ChatWrapper.generateInitialChatHistory
generateContextState() 
generateContextState(__namedParameters: ChatWrapperGenerateContextStateOptions): ChatWrapperGeneratedContextState;Defined in: chatWrappers/QwenChatWrapper.ts:94
Parameters 
| Parameter | Type | 
|---|---|
__namedParameters | ChatWrapperGenerateContextStateOptions | 
Returns 
ChatWrapperGeneratedContextState
Overrides 
ChatWrapper.generateContextState
generateAvailableFunctionsSystemText() 
generateAvailableFunctionsSystemText(availableFunctions: ChatModelFunctions, __namedParameters: {
  documentParams?: boolean;
}): LlamaText;Defined in: chatWrappers/QwenChatWrapper.ts:208
Parameters 
| Parameter | Type | 
|---|---|
availableFunctions | ChatModelFunctions | 
__namedParameters | { documentParams?: boolean; } | 
__namedParameters.documentParams? | boolean |