wingbot 3.73.10 → 3.73.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/ChatGpt.js +6 -0
- package/src/graphApi/gqlRules.js +6 -0
package/package.json
CHANGED
package/src/ChatGpt.js
CHANGED
|
@@ -36,6 +36,7 @@ const LLM = require('./LLM');
|
|
|
36
36
|
/**
|
|
37
37
|
* @typedef {object} DefaultRequestOptions
|
|
38
38
|
* @prop {ChatGPTModel} [model]
|
|
39
|
+
* @prop {'node'|'low'|'medium'|'high'} [reasoningEffort]
|
|
39
40
|
* @prop {number} [presencePenalty=0.0]
|
|
40
41
|
* @prop {number} [requestTokens]
|
|
41
42
|
* @prop {number} [tokensLimit]
|
|
@@ -195,6 +196,7 @@ class ChatGpt {
|
|
|
195
196
|
temperature: 1.0,
|
|
196
197
|
model: 'gpt-4o-mini',
|
|
197
198
|
transcriptLength: -5,
|
|
199
|
+
reasoningEffort: null,
|
|
198
200
|
...rest
|
|
199
201
|
};
|
|
200
202
|
|
|
@@ -285,6 +287,7 @@ class ChatGpt {
|
|
|
285
287
|
model,
|
|
286
288
|
presencePenalty,
|
|
287
289
|
temperature,
|
|
290
|
+
reasoningEffort,
|
|
288
291
|
functions = []
|
|
289
292
|
} = {
|
|
290
293
|
...this._options,
|
|
@@ -323,6 +326,9 @@ class ChatGpt {
|
|
|
323
326
|
frequency_penalty: 0,
|
|
324
327
|
presence_penalty: presencePenalty,
|
|
325
328
|
...(requestTokens ? { max_completion_tokens: requestTokens } : {}),
|
|
329
|
+
...(reasoningEffort ? {
|
|
330
|
+
reasoning: { effort: reasoningEffort }
|
|
331
|
+
} : {}),
|
|
326
332
|
temperature,
|
|
327
333
|
messages
|
|
328
334
|
};
|
package/src/graphApi/gqlRules.js
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
* @author David Menger
|
|
4
4
|
*/
|
|
5
5
|
'use strict';
|
|
6
|
+
const {
|
|
7
|
+
OverlappingFieldsCanBeMergedRule,
|
|
8
|
+
UniqueDirectivesPerLocationRule
|
|
9
|
+
} = require('graphql');
|
|
6
10
|
|
|
7
11
|
/** @typedef {import('graphql').ValidationRule} ValidationRule */
|
|
8
12
|
|
|
@@ -29,6 +33,8 @@ function gqlRules (variables, isProduction, hideVerboseErrors, log = console) {
|
|
|
29
33
|
return [
|
|
30
34
|
...(hideVerboseErrors ? [NoSchemaIntrospectionCustomRule] : []),
|
|
31
35
|
depthLimit(10),
|
|
36
|
+
OverlappingFieldsCanBeMergedRule,
|
|
37
|
+
UniqueDirectivesPerLocationRule,
|
|
32
38
|
createComplexityRule({
|
|
33
39
|
// The maximum allowed query complexity, queries above this threshold will be rejected
|
|
34
40
|
maximumComplexity: 1000,
|