koishi-plugin-aka-ai-generator 0.5.1 → 0.5.2

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.
Files changed (2) hide show
  1. package/lib/index.js +9 -7
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -771,8 +771,8 @@ var GeminiProvider = class {
771
771
  logger
772
772
  );
773
773
  imageParts.push({
774
- inline_data: {
775
- mime_type: mimeType,
774
+ inlineData: {
775
+ mimeType,
776
776
  data
777
777
  }
778
778
  });
@@ -792,7 +792,11 @@ var GeminiProvider = class {
792
792
  }
793
793
  ],
794
794
  generationConfig: {
795
- responseModalities: ["IMAGE"]
795
+ responseModalities: ["IMAGE"],
796
+ imageConfig: {
797
+ aspectRatio: "16:9",
798
+ imageSize: "4K"
799
+ }
796
800
  }
797
801
  };
798
802
  logger.debug("调用 Gemini API", { prompt, imageCount: urls.length, numImages, current: i + 1, endpoint });
@@ -802,10 +806,8 @@ var GeminiProvider = class {
802
806
  requestData,
803
807
  {
804
808
  headers: {
805
- "Content-Type": "application/json"
806
- },
807
- params: {
808
- key: this.config.apiKey
809
+ "Content-Type": "application/json",
810
+ "x-goog-api-key": this.config.apiKey
809
811
  },
810
812
  timeout: this.config.apiTimeout * 1e3
811
813
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-aka-ai-generator",
3
3
  "description": "自用AI生成插件(GPTGod & Yunwu)",
4
- "version": "0.5.1",
4
+ "version": "0.5.2",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [