@nilsd/openai-assistant-lite@0.3.0Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
Built and signed on GitHub Actions
A simple way to send a plain text message to an existing OpenAI Assistant and get a response.
This package works with Node.js, DenoIt is unknown whether this package works with Cloudflare Workers, Bun, Browsers




JSR Score
82%
Published
a year ago (0.3.0)
@nilsd/openai-assistant-lite
A simple way to send a plain text message to an existing OpenAI Assistant and get a response.
Example
- Create an assistant at https://platform.openai.com/assistants and configure it with a return type of
text. - Add instructions and you are good to go using the example below:
import { Assistant } from '@nilsd/openai-assistant-lite'; const assistant = new Assistant({ apiKey: 'your_openai_api_key', assistantId: 'your_assistant_id' // Ex. 'asst_abc123abc123', }); await assistant.initialize(); const response = await assistant.requestReply('How are you doing?'); console.log(response.reply);
Built and signed on
GitHub Actions
Add Package
deno add jsr:@nilsd/openai-assistant-lite
Import symbol
import * as openai_assistant_lite from "@nilsd/openai-assistant-lite";
Import directly with a jsr specifier
import * as openai_assistant_lite from "jsr:@nilsd/openai-assistant-lite";
Add Package
pnpm i jsr:@nilsd/openai-assistant-lite
pnpm dlx jsr add @nilsd/openai-assistant-lite
Import symbol
import * as openai_assistant_lite from "@nilsd/openai-assistant-lite";
Add Package
yarn add jsr:@nilsd/openai-assistant-lite
yarn dlx jsr add @nilsd/openai-assistant-lite
Import symbol
import * as openai_assistant_lite from "@nilsd/openai-assistant-lite";
Add Package
vlt install jsr:@nilsd/openai-assistant-lite
Import symbol
import * as openai_assistant_lite from "@nilsd/openai-assistant-lite";
Add Package
npx jsr add @nilsd/openai-assistant-lite
Import symbol
import * as openai_assistant_lite from "@nilsd/openai-assistant-lite";
Add Package
bunx jsr add @nilsd/openai-assistant-lite
Import symbol
import * as openai_assistant_lite from "@nilsd/openai-assistant-lite";