Skip to content

Commit 8684322

Browse files
CopilotAyRickk
andcommitted
Fix property naming conflict with parent class
- Rename thinkingOpenTag to _thinkingOpenTag (private) - Rename thinkingCloseTag to _thinkingCloseTag (private) - Avoids conflicts with properties that may exist in parent classes Co-authored-by: AyRickk <[email protected]>
1 parent 089c0c5 commit 8684322

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

core/llm/llms/Vllm.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ class Vllm extends OpenAI {
6666
static providerName = "vllm";
6767

6868
// vLLM-specific options for thinking tag extraction
69-
private thinkingOpenTag?: string;
70-
private thinkingCloseTag?: string;
69+
private _thinkingOpenTag?: string;
70+
private _thinkingCloseTag?: string;
7171

7272
// Override useOpenAIAdapterFor to NOT include "streamChat".
7373
// vLLM uses the reasoning_content field for thinking output (via vLLM's reasoning parser),
@@ -97,8 +97,8 @@ class Vllm extends OpenAI {
9797
}
9898

9999
// Store vLLM-specific options
100-
this.thinkingOpenTag = options.thinkingOpenTag;
101-
this.thinkingCloseTag = options.thinkingCloseTag;
100+
this._thinkingOpenTag = options.thinkingOpenTag;
101+
this._thinkingCloseTag = options.thinkingCloseTag;
102102

103103
if (options.isFromAutoDetect) {
104104
this._setupCompletionOptions();
@@ -116,7 +116,7 @@ class Vllm extends OpenAI {
116116
options: CompletionOptions,
117117
): AsyncGenerator<ChatMessage> {
118118
// If no custom thinking tags configured, use parent implementation
119-
if (!this.thinkingOpenTag || !this.thinkingCloseTag) {
119+
if (!this._thinkingOpenTag || !this._thinkingCloseTag) {
120120
for await (const chunk of super._streamChat(messages, signal, options)) {
121121
yield chunk;
122122
}
@@ -125,8 +125,8 @@ class Vllm extends OpenAI {
125125

126126
// Use thinking tag extractor for custom tag formats
127127
const extractor = new ThinkingTagExtractor(
128-
this.thinkingOpenTag,
129-
this.thinkingCloseTag,
128+
this._thinkingOpenTag,
129+
this._thinkingCloseTag,
130130
);
131131

132132
for await (const chunk of super._streamChat(messages, signal, options)) {

0 commit comments

Comments
 (0)