@adminforth/completion-adapter-google-gemini 1.0.2 → 1.0.3

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/dist/index.js CHANGED
@@ -19,11 +19,7 @@ export default class CompletionAdapterGoogleGemini {
19
19
  const response = yield ai.models.generateContent({
20
20
  model: this.options.model || "gemini-3-flash-preview",
21
21
  contents: content,
22
- config: {
23
- temperature: (_b = (_a = this.options.expert) === null || _a === void 0 ? void 0 : _a.temperature) !== null && _b !== void 0 ? _b : 0.7,
24
- maxOutputTokens: maxTokens,
25
- stopSequences: stop,
26
- },
22
+ config: Object.assign({ temperature: (_b = (_a = this.options.expert) === null || _a === void 0 ? void 0 : _a.temperature) !== null && _b !== void 0 ? _b : 0.7, maxOutputTokens: maxTokens, stopSequences: stop }, this.options.extraRequestBodyParameters),
27
23
  });
28
24
  return {
29
25
  content: response.text,
package/index.ts CHANGED
@@ -36,6 +36,7 @@ export default class CompletionAdapterGoogleGemini
36
36
  temperature: this.options.expert?.temperature ?? 0.7,
37
37
  maxOutputTokens: maxTokens,
38
38
  stopSequences: stop,
39
+ ...this.options.extraRequestBodyParameters,
39
40
  },
40
41
  });
41
42
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adminforth/completion-adapter-google-gemini",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",
package/types.ts CHANGED
@@ -11,6 +11,12 @@ export interface AdapterOptions {
11
11
  */
12
12
  model?: string;
13
13
 
14
+
15
+ /**
16
+ * Additional request body parameters to include in the API request.
17
+ */
18
+ extraRequestBodyParameters?: Record<string, unknown>;
19
+
14
20
  /**
15
21
  * Expert settings
16
22
  */