tryreason
TypeScript icon, indicating that this package has built-in type declarations

0.0.5-pago • Public • Published

REASON

RΞASON

The minimalistic Typescript framework for building great LLM apps.

npx use-reason@latest

A small demo:

import { reason } from 'tryreason'

interface Joke {
  /** Use this property to indicate the age rating of the joke */
  rating: number;
  joke: string;

  /** Use this property to explain the joke to those who did not understood it */
  explanation: string;
}

const joke = await reason<Joke>('tell me a really spicy joke')

The value of the joke object is:

{
  "joke": "I'd tell you a chemistry joke but I know I wouldn't get a reaction.",
  "rating": 18,
  "explanation": "This joke is a play on words. The term 'reaction' refers to both a chemical process and a response from someone. The humor comes from the double meaning, implying that the joke might not be funny enough to elicit a response."
}

Yep, RΞASON actually utilizes your Typescript type information as the guide for the LLM. This is a key distinction: RΞASON uses Typescript (& JSDoc comments) at runtime to help the LLM know what to return.

Getting started

Head over to https://docs.tryreason.dev to get started & learn more.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.0.5-pago0latest

Version History

VersionDownloads (Last 7 Days)Published
0.0.5-pago0
0.0.4-pago0
0.0.21-alpha10
0.0.20-alpha10
0.0.19-alpha11
0.0.18-alpha11
0.0.17-alpha0
0.0.16-alpha0
0.0.15-alpha11
0.0.14-alpha11
0.0.13-alpha11
0.0.12-alpha0
0.0.11-alpha0
0.0.10-alpha0
0.0.9-alpha0
0.0.8-alpha0
0.0.7-alpha0
0.0.6-alpha0
0.0.5-alpha0
0.0.4-alpha0
0.0.3-alpha0
0.0.2-alpha0
0.0.1-alpha0

Package Sidebar

Install

npm i tryreason

Weekly Downloads

75

Version

0.0.5-pago

License

MIT

Unpacked Size

262 MB

Total Files

345

Last publish

Collaborators

  • inaciom