rewrite the request location
This commit is contained in:
parent
563d6243e5
commit
a6d894026f
1 changed files with 1 additions and 1 deletions
|
@ -33,7 +33,7 @@ export default class gemini {
|
||||||
this.model[`name`] = ((typeof model).includes(`str`) && model) ? ((model.includes(`models/`)) ? model : `models/`.concat(model)) : 'gemini-pro';
|
this.model[`name`] = ((typeof model).includes(`str`) && model) ? ((model.includes(`models/`)) ? model : `models/`.concat(model)) : 'gemini-pro';
|
||||||
|
|
||||||
// Set the request location.
|
// Set the request location.
|
||||||
this.#request[`location`] = `https://generativelanguage.googleapis.com/`.concat(((version != null && !Array.isArray(version) && typeof(version).includes(`obj`)) ? version[`API`] : false) ? version[`API`] : `v1beta`, `/`, this.model.name);
|
this.#request[`location`] = `https://generativelanguage.googleapis.com/${((version != null && !Array.isArray(version) && typeof(version).includes(`obj`)) ? version[`API`] : false) ? version[`API`] : `v1beta`}/${this.model.name}`;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue