@deux_labs/ai-assistant-kit
TypeScript icon, indicating that this package has built-in type declarations

1.2.2 • Public • Published

OpenRouter AI Assistant Small Kit

Provides a small kit to communicate with Openrouter API seamlessly.

Example:

import { OpenRouter } from '@deux_labs/ai-assistant-kit';

const openrouter = new OpenRouter({
  apiKey: process.env.OPENROUTER_KEY,
  model: 'nousresearch/hermes-3-llama-3.1-405b:free'
});

async function main() {
  const { data } = await openrouter.getResponseText({
    messages: [{
      content: 'Hi, I\m Lee',
      role: 'user'
    }]
  });

  return data;
}

main().then(data => console.log(data));

// Result:
// {
//   role: 'assistant',
//   content: "Hello Lee! It's nice to meet you. How can I assist you today?"
// }

Readme

Keywords

Package Sidebar

Install

npm i @deux_labs/ai-assistant-kit

Weekly Downloads

0

Version

1.2.2

License

MIT

Unpacked Size

25 kB

Total Files

7

Last publish

Collaborators

  • _edwardlee