Skip to content

Commit

Permalink
added: naomi
Browse files Browse the repository at this point in the history
  • Loading branch information
Rstacx committed Feb 20, 2024
1 parent 52eb460 commit 8a4ccfa
Show file tree
Hide file tree
Showing 6 changed files with 123 additions and 3 deletions.
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# rsnchat

This package package for interacting with GPT4-based chat services, OpenChat, Bard, Gemini, LlaMa, Mixtral, Claude, Prodia, Kandinsky, Absolutebeauty, Sdxl, Dalle and AI Icon without restrictions or limits
This package package for interacting with GPT4-based chat services, OpenChat, Bard, Gemini, LlaMa, Mixtral, Claude, Naomi, Prodia, Kandinsky, Absolutebeauty, Sdxl, Dalle and AI Icon without restrictions or limits

## Installation

Expand Down Expand Up @@ -130,6 +130,18 @@ rsnchat.claude("Hello, what is your name?").then((response) => {
});
```

## Usage Naomi (ai girlfriend) (premium)

```javascript
const { RsnChat } = require("rsnchat");

const rsnchat = new RsnChat("rsnai_××××××××××××××××××××××");

rsnchat.naomi("Hello, what is your name?").then((response) => {
console.log(response.message);
});
```

## Usage Prodia

```javascript
Expand Down
31 changes: 31 additions & 0 deletions build/cjs/index.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,37 @@ class RsnChat {
}
});
}
/**
* Generate Text Completion via Naomi
* @param {string} prompt Naomi prompt
* @example
* ```js
* const { RsnChat } = require("rsnchat");
*
* const rsnchat = new RsnChat("rsnai_××××××××××××××××××××××");
*
* rsnchat.naomi("Hello, what is your name?").then((response) => {
* console.log(response.message);
* });
* ```
* @returns {Promise<TextResult>}
*/
naomi(prompt) {
return __awaiter(this, void 0, void 0, function* () {
try {
const payload = {
prompt: prompt,
};
const response = yield axios_1.default.post(`${apiUrl}/naomi`, payload, {
headers: this.headers,
});
return response.data;
}
catch (error) {
throw new Error(`RsnChat Naomi Error: ${error}`);
}
});
}
/**
* Generate Text Completion via CodeLLaMa
* @param {string} prompt CodeLlaMa prompt
Expand Down
31 changes: 31 additions & 0 deletions build/esm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,37 @@ class RsnChat {
}
});
}
/**
* Generate Text Completion via Naomi
* @param {string} prompt Naomi prompt
* @example
* ```js
* const { RsnChat } = require("rsnchat");
*
* const rsnchat = new RsnChat("rsnai_××××××××××××××××××××××");
*
* rsnchat.naomi("Hello, what is your name?").then((response) => {
* console.log(response.message);
* });
* ```
* @returns {Promise<TextResult>}
*/
naomi(prompt) {
return __awaiter(this, void 0, void 0, function* () {
try {
const payload = {
prompt: prompt,
};
const response = yield axios.post(`${apiUrl}/naomi`, payload, {
headers: this.headers,
});
return response.data;
}
catch (error) {
throw new Error(`RsnChat Naomi Error: ${error}`);
}
});
}
/**
* Generate Text Completion via CodeLLaMa
* @param {string} prompt CodeLlaMa prompt
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "rsnchat",
"version": "3.0.7",
"description": "A package for interacting with GPT4-based chat services, OpenChat, Bard, Gemini, Bing, LlaMa, CodeLlama, Mixtral, Claude, Prodia, Kandinsky, Absolutebeauty, Sdxl, Dalle and AI Icon",
"version": "3.0.8",
"description": "A package for interacting with GPT4-based chat services, OpenChat, Bard, Gemini, Bing, LlaMa, CodeLlama, Mixtral, Claude, Naomi, Prodia, Kandinsky, Absolutebeauty, Sdxl, Dalle and AI Icon",
"type": "module",
"types": "./types/index.d.ts",
"bin": {
Expand Down
30 changes: 30 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,36 @@ class RsnChat {
throw new Error(`RsnChat Claude Error: ${error}`);
}
}

/**
* Generate Text Completion via Naomi
* @param {string} prompt Naomi prompt
* @example
* ```js
* const { RsnChat } = require("rsnchat");
*
* const rsnchat = new RsnChat("rsnai_××××××××××××××××××××××");
*
* rsnchat.naomi("Hello, what is your name?").then((response) => {
* console.log(response.message);
* });
* ```
* @returns {Promise<TextResult>}
*/
async naomi(prompt: string): Promise<TextResult> {
try {
const payload = {
prompt: prompt,
};

const response = await axios.post(`${apiUrl}/naomi`, payload, {
headers: this.headers,
});
return response.data as TextResult;
} catch (error) {
throw new Error(`RsnChat Naomi Error: ${error}`);
}
}

/**
* Generate Text Completion via CodeLLaMa
Expand Down
16 changes: 16 additions & 0 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,22 @@ declare class RsnChat {
* @returns {Promise<TextResult>}
*/
claude(prompt: string): Promise<TextResult>;
/**
* Generate Text Completion via Naomi
* @param {string} prompt Naomi prompt
* @example
* ```js
* const { RsnChat } = require("rsnchat");
*
* const rsnchat = new RsnChat("rsnai_××××××××××××××××××××××");
*
* rsnchat.naomi("Hello, what is your name?").then((response) => {
* console.log(response.message);
* });
* ```
* @returns {Promise<TextResult>}
*/
naomi(prompt: string): Promise<TextResult>;
/**
* Generate Text Completion via CodeLLaMa
* @param {string} prompt CodeLlaMa prompt
Expand Down

0 comments on commit 8a4ccfa

Please sign in to comment.