@leikeduntech/leiai-js 3.4.3 → 3.4.5

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/build/index.js +11 -11
  2. package/package.json +1 -1
package/build/index.js CHANGED
@@ -396,6 +396,17 @@ Current date: ${currentDate}`;
396
396
  messages,
397
397
  stream
398
398
  };
399
+ if (this._manufacturer.toLowerCase() === "baidu" && typeof pluginList === "string" && pluginList.indexOf("zhishiku") > -1) {
400
+ if (body.model)
401
+ delete body.model;
402
+ if (body.max_tokens)
403
+ delete body.max_tokens;
404
+ if (body.temperature)
405
+ delete body.temperature;
406
+ } else {
407
+ if (typeof body.plugins !== void 0)
408
+ delete body.plugins;
409
+ }
399
410
  if (["openai", "azure"].indexOf(this._manufacturer.toLowerCase()) > -1) {
400
411
  switch (pluginList) {
401
412
  case "dall-e-3":
@@ -473,17 +484,6 @@ Current date: ${currentDate}`;
473
484
  if (this._apiOrg && this._manufacturer.toLowerCase() === "openai") {
474
485
  headers["OpenAI-Organization"] = this._apiOrg;
475
486
  }
476
- if (this._manufacturer.toLowerCase() === "baidu" && typeof pluginList === "string" && pluginList.indexOf("zhishiku") > -1) {
477
- if (body.model)
478
- delete body.model;
479
- if (body.max_tokens)
480
- delete body.max_tokens;
481
- if (body.temperature)
482
- delete body.temperature;
483
- } else {
484
- if (typeof body.plugins !== void 0)
485
- delete body.plugins;
486
- }
487
487
  if (this._debug) {
488
488
  console.log(`api url ${url}`);
489
489
  console.log(`api header ${JSON.stringify(headers)}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leikeduntech/leiai-js",
3
- "version": "3.4.3",
3
+ "version": "3.4.5",
4
4
  "author": "liuhean",
5
5
  "repository": {
6
6
  "type": "git",