Class: QwenChatWrapper
Defined in: chatWrappers/QwenChatWrapper.ts:12
Extends
Constructors
Constructor
new QwenChatWrapper(options?: {
keepOnlyLastThought?: boolean;
thoughts?: "auto" | "discourage" | "modelInitiated";
variation?: "3" | "3.5";
}): QwenChatWrapper;Defined in: chatWrappers/QwenChatWrapper.ts:23
Parameters
| Parameter | Type | Description |
|---|---|---|
options | { keepOnlyLastThought?: boolean; thoughts?: "auto" | "discourage" | "modelInitiated"; variation?: "3" | "3.5"; } | - |
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" | "modelInitiated" | Control the usage of thoughts in the model responses. When set to "modelInitiated", thought segments won't be force-opened at the start of the model response, even if that's what the model would normally expect. Defaults to "auto". |
options.variation? | "3" | "3.5" | Chat template variation to use. Defaults to "3". |
Returns
QwenChatWrapper
Overrides
Properties
defaultSettings
static defaultSettings: ChatWrapperSettings;Defined in: ChatWrapper.ts:15
Inherited from
wrapperName
readonly wrapperName: string = "Qwen";Defined in: chatWrappers/QwenChatWrapper.ts:13
Overrides
variation
readonly variation: "3" | "3.5";Defined in: chatWrappers/QwenChatWrapper.ts:14
keepOnlyLastThought
readonly keepOnlyLastThought: boolean;Defined in: chatWrappers/QwenChatWrapper.ts:16
thoughts
readonly thoughts: "auto" | "discourage" | "modelInitiated";Defined in: chatWrappers/QwenChatWrapper.ts:17
settings
readonly settings: ChatWrapperSettings;Defined in: chatWrappers/QwenChatWrapper.ts:21
Overrides
Methods
generateFunctionCallsAndResults()
generateFunctionCallsAndResults(functionCalls: ChatModelFunctionCall[], useRawCall?: boolean): LlamaText;Defined in: ChatWrapper.ts:63
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:110
Parameters
| Parameter | Type |
|---|---|
name | string |
params | any |
Returns
Inherited from
ChatWrapper.generateFunctionCall
generateModelResponseText()
generateModelResponseText(modelResponse: (
| string
| ChatModelFunctionCall
| ChatModelSegment)[], useRawValues?: boolean): LlamaText;Defined in: ChatWrapper.ts:158
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:269
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:290
Parameters
| Parameter | Type |
|---|---|
__namedParameters | ChatWrapperGenerateInitialHistoryOptions |
Returns
Inherited from
ChatWrapper.generateInitialChatHistory
generateContextState()
generateContextState(__namedParameters: ChatWrapperGenerateContextStateOptions): ChatWrapperGeneratedContextState;Defined in: chatWrappers/QwenChatWrapper.ts:158
Parameters
| Parameter | Type |
|---|---|
__namedParameters | ChatWrapperGenerateContextStateOptions |
Returns
ChatWrapperGeneratedContextState
Overrides
ChatWrapper.generateContextState
generateFunctionCallResult()
generateFunctionCallResult(
functionName: string,
functionParams: any,
result: any): LlamaText;Defined in: chatWrappers/QwenChatWrapper.ts:287
Parameters
| Parameter | Type |
|---|---|
functionName | string |
functionParams | any |
result | any |
Returns
Overrides
ChatWrapper.generateFunctionCallResult
generateAvailableFunctionsSystemText()
generateAvailableFunctionsSystemText(availableFunctions: ChatModelFunctions, __namedParameters: {
documentParams?: boolean;
}): LlamaText;Defined in: chatWrappers/QwenChatWrapper.ts:294
Parameters
| Parameter | Type |
|---|---|
availableFunctions | ChatModelFunctions |
__namedParameters | { documentParams?: boolean; } |
__namedParameters.documentParams? | boolean |