globalsprak
Advanced tools
Comparing version 1.0.4 to 1.0.5
10
index.js
@@ -542,5 +542,10 @@ const axios = require('axios'); | ||
async function gen2(prompt, count) { | ||
async function ai(prompt, model) { | ||
try { | ||
const response = await axios.get(`${API}/v1/generate?prompt=${encodeURIComponent(prompt)}&count=${count}`); | ||
const response = await axios.get(`${API}/v1/chat/completions`, { | ||
params: { | ||
prompt: encodeURIComponent(prompt), | ||
model: model | ||
} | ||
}); | ||
return response.data; | ||
@@ -605,2 +610,3 @@ } catch (error) { | ||
pixelart, | ||
ai, | ||
}; |
{ | ||
"name": "globalsprak", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "globalsprak is a Node.js package that provides access to various AI models, image generation, content downloading from various platforms, and more.", | ||
@@ -10,3 +10,3 @@ "main": "index.js", | ||
"keywords": [ | ||
"globalsprak", | ||
"restapi", | ||
"gpt", | ||
@@ -41,3 +41,10 @@ "prodia", | ||
"prodia", | ||
"flux" | ||
"flux", | ||
"claude", | ||
"gen", | ||
"manga", | ||
"tempmail", | ||
"weather", | ||
"lyrics", | ||
"download" | ||
], | ||
@@ -44,0 +51,0 @@ "author": "Aryan Chauhan", |
48761
560
1117