Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
yitechx-ai
Node.js modülü, YiTechX API'si ile kolayca entegre olmanızı sağlar. Bu modül, sohbet geçmişini destekler ve API üzerinden mesaj gönderip yanıt almanızı sağlar.
npm install yitechx-ai
const YiAI = require('yitechx-ai');
// API anahtarınızı girin
const client = new YiAI('sk-your-api-key');
// Sohbet mesajı gönder
(async () => {
try {
const chatHistory = [
{ role: 'user', content: 'Merhaba, sen kimsin?' },
{ role: 'model', content: 'Merhaba! Ben bir yapay zeka asistanıyım.' }
];
const response = await client.sendMessage("Bana biraz kendinden bahseder misin?", chatHistory);
console.log("Yanıt:", JSON.stringify(response, null, 2));
} catch (error) {
console.error("Hata:", error.message);
}
})();
sendMessage(prompt, chatHistory = [], temperature = 0.7)
API'ye bir mesaj gönderir ve yanıt alır.
[
{ role: 'user', content: 'Merhaba!' },
{ role: 'model', content: 'Merhaba! Size nasıl yardımcı olabilirim?' }
]
0.7
.Başarılı bir yanıt aşağıdaki gibi görünebilir:
{
"response": "Ben YiTechX AI asistanıyım. Size nasıl yardımcı olabilirim?"
}
Modül, istek sırasında oluşan hataları yönetir ve ayrıntılı hata mesajları döner:
try {
const response = await client.sendMessage("Test mesajı");
} catch (error) {
console.error("Hata:", error.message);
}
axios
: HTTP isteklerini kolayca yapmak için.FAQs
Node.js client for YitechX AI API
The npm package yitechx-ai receives a total of 67 weekly downloads. As such, yitechx-ai popularity was classified as not popular.
We found that yitechx-ai demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.