0.0.20 • Published 28 days ago

hook-ai v0.0.20

Weekly downloads
-
License
MIT
Repository
github
Last release
28 days ago

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

0.0.20-6588eb4

28 days ago

0.0.20

1 month ago

0.0.19-33aff85

1 month ago

0.0.19-62aabdb

2 months ago

0.0.18-73b108e

2 months ago

0.0.18

2 months ago

0.0.19

2 months ago

0.0.17

2 months ago

0.0.16-e289447

3 months ago

0.0.16

3 months ago

0.0.15

3 months ago

0.0.13

3 months ago

0.0.14

3 months ago

0.0.11

3 months ago

0.0.12

3 months ago

0.0.10

3 months ago

0.0.9-1e911a9

3 months ago

0.0.9

3 months ago

0.0.8

3 months ago

0.0.5

3 months ago

0.0.4

3 months ago

0.0.7

3 months ago

0.0.6

3 months ago

0.0.3

3 months ago

0.0.2-516ac77

3 months ago

0.0.2-327d04c

3 months ago

0.0.2-a3dd2f5

3 months ago

0.0.2-3d26cde

3 months ago

0.0.2-261a94d

3 months ago

0.0.2-7b6cd95

3 months ago

0.0.2-d4d6e62

3 months ago

0.0.2-6669d6c

3 months ago

0.0.2-1f03621

3 months ago

0.0.2-5378d1c

3 months ago

0.0.2-6634074

3 months ago

0.0.2-98f291a

3 months ago

0.0.2-e62748c

3 months ago

0.0.2

3 months ago

0.0.1-1b54743

3 months ago

0.0.1-f7a5b81

3 months ago

0.0.1

4 months ago