-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from MGalaCyber/master
Fixed Cannot read properties of undefined (reading 'data')
- Loading branch information
Showing
5 changed files
with
26 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,8 +11,6 @@ Full API Implementation inside NodeJS Module | |
- More info at [`Website`](https://api.universebot.space) | ||
- Documentation [`Website`](https://docs.universebot.space) | ||
- Get **API TOKEN** here [`Register`](https://api.universebot.space/register) | ||
- _Free trial **premium** for `3 days` for new user._ | ||
- And you can upgrade your api token to premium, you can see more details at [`UPGRADE`](https://api.universebot.space/dashboard/pricing) | ||
|
||
## Installation | ||
npm: | ||
|
@@ -29,7 +27,7 @@ $ pnpm add @mgalacyber/universeapi | |
``` | ||
|
||
## Simple to Use | ||
## CommonJs (CJS) syntax | ||
## CommonJS (CJS) syntax | ||
```js | ||
const { UniverseClient } = require("@mgalacyber/universeapi"); | ||
const uAPI = new UniverseClient("API-TOKEN"); | ||
|
@@ -57,5 +55,8 @@ uAPI.V1.AI.OpenAI.GPT.Text({ | |
``` | ||
|
||
|
||
# Feedback | ||
If you have any feedback, please reach out to us at `[email protected]` | ||
# Bugs, Glitches and Issues | ||
If you encounter any problems feel free to open an issue in our | ||
- [GitHub Repository](https://github.com/UniverseBot/UniverseAPI-Wrapper/issues) | ||
- [Telegram Group](https://t.me/GalaxyUniverseOfficial) | ||
- [Discord Server](https://discord.gg/uESnRWjEwv) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
module.exports = function(Api) { | ||
return { | ||
Generate: async function(options) { | ||
const { version, prompt } = options; | ||
const { model, version, prompt } = options; | ||
|
||
return (await Api()).Get(`v1/ai/text2img/model${version}`, { prompt }); | ||
if (model && model.length > 0) { | ||
return (await Api()).Get(`v1/ai/text2img/model${version}`, { prompt, model }); | ||
} else { | ||
return (await Api()).Get(`v1/ai/text2img/model${version}`, { prompt }); | ||
} | ||
} | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters