Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
GPTyped: A small, but powerful NPM package that calls GPT in a type-safe way (github.com/juanignaciomolina)
4 points by tough on May 2, 2023 | hide | past | favorite | 2 comments


Welcome to GPTyped!

A small, but powerful NPM package that lets you interact with OpenAI's GPT language model in a type-safe way. With GPTyped, you can send objects as prompts and receive structured responses from LLM AIs in a breeze, whether you're running it on the Web or on the Server.

Features

- Sends TypeScript objects as prompts and receives TypeScript objects as responses.

- Fully customizable with interceptors to alter requests or responses at any time.

- Comes pre-loaded with an OpenAI client for easy integration with GPT.

- Validates returned objects schemas using Zod.

- Support for common prompt patterns, like memory and metaprompts.


This looks great, thanks for posting it




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: