Skip to content

Commit

Permalink
Update rsnchat.js
Browse files Browse the repository at this point in the history
  • Loading branch information
iscordian authored Jan 23, 2024
1 parent 93deaca commit 6fd4196
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions build/rsnchat.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const OpenChat_ApiUrl = "https://ai.rnilaweera.ovh/api/v1/user/openchat";
const Bard_ApiUrl = "https://ai.rnilaweera.ovh/api/v1/user/bard";
const Gemini_ApiUrl = "https://ai.rnilaweera.ovh/api/v1/user/gemini";
const LlamaApiUrl = "https://ai.rnilaweera.ovh/api/v1/user/llama";
const CodeLlamaApiUrl = "https://ai.rnilaweera.ovh/api/v1/user/codellama";
const MixtralApiUrl = "https://ai.rnilaweera.ovh/api/v1/user/mixtral";

const ProdiaApiUrl = "https://ai.rnilaweera.ovh/api/v1/user/prodia";
Expand Down Expand Up @@ -135,6 +136,25 @@ class RsnChat {
throw new Error(`RsnChat Mixtral Error: ${error}`);
}
}

async codellama(prompt) {
try {
const payload = {
prompt: prompt,
};

const authHeader = `Bearer ${this.apiKey}`;

const headers = {
Authorization: authHeader,
};

const response = await axios.post(CodeLlamaApiUrl, payload, { headers });
return response.data;
} catch (error) {
throw new Error(`RsnChat CodeLlaMa Error: ${error}`);
}
}

async prodia(prompt, negative_prompt, model) {
try {
Expand Down

0 comments on commit 6fd4196

Please sign in to comment.