@@ -55,6 +55,9 @@ function disposeClient(client) {
55
55
if ( client . responseMessageId ) {
56
56
client . responseMessageId = null ;
57
57
}
58
+ if ( client . message_file_map ) {
59
+ client . message_file_map = null ;
60
+ }
58
61
if ( client . clientName ) {
59
62
client . clientName = null ;
60
63
}
@@ -79,6 +82,147 @@ function disposeClient(client) {
79
82
if ( client . outputTokensKey ) {
80
83
client . outputTokensKey = null ;
81
84
}
85
+ if ( client . skipSaveUserMessage !== undefined ) {
86
+ client . skipSaveUserMessage = null ;
87
+ }
88
+ if ( client . visionMode ) {
89
+ client . visionMode = null ;
90
+ }
91
+ if ( client . continued !== undefined ) {
92
+ client . continued = null ;
93
+ }
94
+ if ( client . fetchedConvo !== undefined ) {
95
+ client . fetchedConvo = null ;
96
+ }
97
+ if ( client . previous_summary ) {
98
+ client . previous_summary = null ;
99
+ }
100
+ if ( client . metadata ) {
101
+ client . metadata = null ;
102
+ }
103
+ if ( client . isVisionModel ) {
104
+ client . isVisionModel = null ;
105
+ }
106
+ if ( client . isChatCompletion !== undefined ) {
107
+ client . isChatCompletion = null ;
108
+ }
109
+ if ( client . contextHandlers ) {
110
+ client . contextHandlers = null ;
111
+ }
112
+ if ( client . augmentedPrompt ) {
113
+ client . augmentedPrompt = null ;
114
+ }
115
+ if ( client . systemMessage ) {
116
+ client . systemMessage = null ;
117
+ }
118
+ if ( client . azureEndpoint ) {
119
+ client . azureEndpoint = null ;
120
+ }
121
+ if ( client . langchainProxy ) {
122
+ client . langchainProxy = null ;
123
+ }
124
+ if ( client . isOmni !== undefined ) {
125
+ client . isOmni = null ;
126
+ }
127
+ if ( client . runManager ) {
128
+ client . runManager = null ;
129
+ }
130
+ // Properties specific to AnthropicClient
131
+ if ( client . message_start ) {
132
+ client . message_start = null ;
133
+ }
134
+ if ( client . message_delta ) {
135
+ client . message_delta = null ;
136
+ }
137
+ if ( client . isClaude3 !== undefined ) {
138
+ client . isClaude3 = null ;
139
+ }
140
+ if ( client . useMessages !== undefined ) {
141
+ client . useMessages = null ;
142
+ }
143
+ if ( client . isLegacyOutput !== undefined ) {
144
+ client . isLegacyOutput = null ;
145
+ }
146
+ if ( client . supportsCacheControl !== undefined ) {
147
+ client . supportsCacheControl = null ;
148
+ }
149
+ // Properties specific to GoogleClient
150
+ if ( client . serviceKey ) {
151
+ client . serviceKey = null ;
152
+ }
153
+ if ( client . project_id ) {
154
+ client . project_id = null ;
155
+ }
156
+ if ( client . client_email ) {
157
+ client . client_email = null ;
158
+ }
159
+ if ( client . private_key ) {
160
+ client . private_key = null ;
161
+ }
162
+ if ( client . access_token ) {
163
+ client . access_token = null ;
164
+ }
165
+ if ( client . reverseProxyUrl ) {
166
+ client . reverseProxyUrl = null ;
167
+ }
168
+ if ( client . authHeader ) {
169
+ client . authHeader = null ;
170
+ }
171
+ if ( client . isGenerativeModel !== undefined ) {
172
+ client . isGenerativeModel = null ;
173
+ }
174
+ // Properties specific to OpenAIClient
175
+ if ( client . ChatGPTClient ) {
176
+ client . ChatGPTClient = null ;
177
+ }
178
+ if ( client . completionsUrl ) {
179
+ client . completionsUrl = null ;
180
+ }
181
+ if ( client . shouldSummarize !== undefined ) {
182
+ client . shouldSummarize = null ;
183
+ }
184
+ if ( client . isOllama !== undefined ) {
185
+ client . isOllama = null ;
186
+ }
187
+ if ( client . FORCE_PROMPT !== undefined ) {
188
+ client . FORCE_PROMPT = null ;
189
+ }
190
+ if ( client . isChatGptModel !== undefined ) {
191
+ client . isChatGptModel = null ;
192
+ }
193
+ if ( client . isUnofficialChatGptModel !== undefined ) {
194
+ client . isUnofficialChatGptModel = null ;
195
+ }
196
+ if ( client . useOpenRouter !== undefined ) {
197
+ client . useOpenRouter = null ;
198
+ }
199
+ if ( client . startToken ) {
200
+ client . startToken = null ;
201
+ }
202
+ if ( client . endToken ) {
203
+ client . endToken = null ;
204
+ }
205
+ if ( client . userLabel ) {
206
+ client . userLabel = null ;
207
+ }
208
+ if ( client . chatGptLabel ) {
209
+ client . chatGptLabel = null ;
210
+ }
211
+ if ( client . modelLabel ) {
212
+ client . modelLabel = null ;
213
+ }
214
+ if ( client . modelOptions ) {
215
+ client . modelOptions = null ;
216
+ }
217
+ if ( client . defaultVisionModel ) {
218
+ client . defaultVisionModel = null ;
219
+ }
220
+ if ( client . maxPromptTokens ) {
221
+ client . maxPromptTokens = null ;
222
+ }
223
+ if ( client . maxResponseTokens ) {
224
+ client . maxResponseTokens = null ;
225
+ }
82
226
if ( client . run ) {
83
227
// Break circular references in run
84
228
if ( client . run . Graph ) {
0 commit comments