elysia-ollama
v1.0.19
Published
<h2 style="color:red">*** Compatible with only Elysia version ^1.1.25 or upper.</h2>
Downloads
890
Readme
elysia-ollama
Installation
npm i elysia-ollama
yarn i elysia-ollama
pnpm a elysia-ollama
bun a elysia-ollama
Usage:
import Elysia from "elysia"
import { ElysiaOllama } from "elysia-ollama"
const { port = 2000 } = Bun.env
const elysiaOllama = new ElysiaOllama({ prefix: "/api" }).setOllama({
host: "http://localhost:11434",
})
const app = new Elysia().use(elysiaOllama.elysia).listen(port)
console.log(
`🦊 Elysia is running at http://${app.server?.hostname}:${app.server?.port}`
);
ollama api docs https://github.com/ollama/ollama/blob/main/docs/api.md
This project was created using bun init
in bun v1.1.29. Bun is a fast all-in-one JavaScript runtime.