hook-ai v0.0.20
Hook AI
Your go-to package for versatile AI integration.
Our API lets you use the same syntax to call various services (e.g., OpenAI and Google Gemini), including self-hosted ones^1, with just a model name change. We also offer containerized server code for hosting your own endpoint, to switch models without changing your client code^1.
We aim for a package that is even easier to use than the official SDKs, with simple and unified syntax and hinting. For example, with dynamic typing, you can easily pick an available model from the dropdown in your IDE. Stay tuned for more details and documentation.
Table of Contents
Installation
npm install hook-ai
Usage
import AI from 'hook-ai'
const ai = AI().openai('your-api-key')
const res = await ai.chat(ai.models.chat.GPT_4, [
{
role: 'user',
content: 'Hello, how are you?',
},
])
Contributing
^1: Coming soon
28 days ago
1 month ago
1 month ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
4 months ago