ai icon indicating copy to clipboard operation
ai copied to clipboard

Add Hono.js example

Open yutakobayashidev opened this issue 2 years ago • 6 comments

Hono.js is a web framework for the Edge environment. Works with Cloudflare Workers, Deno, Bun, Fastly, Vercel, Netlify, Lagon, AWS, Node.js.

Now that the Vercel AI SDK runs in Hono.js and the OpenAI package runs in Edge, you can build the backend of your AI application in a few dozen lines of code.

https://twitter.com/ogtimothymiller/status/1694208003346407722

https://hono.dev/

yutakobayashidev avatar Aug 25 '23 09:08 yutakobayashidev

A PR with docs and/or an example would be accepted if you'd like to submit one

MaxLeiter avatar Aug 26 '23 18:08 MaxLeiter

Node http server example: https://github.com/vercel/ai/tree/main/examples/node-http-server

lgrammel avatar May 23 '24 15:05 lgrammel

Hono also runs in Node.js, but the core is web-standard and optimized for the Edge environment.

Recently, Hono maintainers created an Example:

https://github.com/yusukebe/hono-with-vercel-ai

yutakobayashidev avatar May 28 '24 04:05 yutakobayashidev

@yutakobayashidev sadly their example is outdated. I'll send a PR to update it to AI SDK 3.1 when I find the time

lgrammel avatar May 28 '24 07:05 lgrammel

@yutakobayashidev sadly their example is outdated. I'll send a PR to update it to AI SDK 3.1 when I find the time

would appreciate this so much!

KorigamiK avatar Jul 07 '24 21:07 KorigamiK

If you're trying this out on bun it's currently not supported. https://github.com/oven-sh/bun/issues/5648

KorigamiK avatar Jul 08 '24 09:07 KorigamiK

Did you update it? @lgrammel

ansh avatar Aug 15 '24 19:08 ansh

Submitted a PR to update Hono's example to AI SDK Core: https://github.com/yusukebe/hono-with-vercel-ai/pull/1

n1ckoates avatar Sep 05 '24 18:09 n1ckoates

https://sdk.vercel.ai/examples/api-servers/hono

lgrammel avatar Sep 09 '24 11:09 lgrammel