@intervene/parser
TypeScript icon, indicating that this package has built-in type declarations

0.1.12 • Public • Published

Intervene Parser

Intervene Parser Logo

Discord

Introduction | How to use | FAQs | Contact

Launching a drop-in replacement to Zapier NLA by Nov 7th! Please contact me me@sudhanshug.com if you have any questions.

Introduction

Open source Natural Language Actions (NLA)

Translate natural language into API calls.


Here is a web based demo to try it out:

https://tryintervene.github.io/parser-demo/


Here's a quick demo video:

https://github.com/tryintervene/parser/assets/9914480/b91eb0d2-64c5-4231-8989-1c27a105c3be

Here's a sample output:

{
    "provider": "<API provider name>",
    "method": "<Http Method>",
    "path": "<API endpoint to call>",
    "bodyParams": "<eval'able function to return body params>",
    "queryParams": "<eval'able function to return query params>",
    "pathParams": "<eval'able function to return path params>",
    "requestContentType": "application/x-www-form-urlencoded",
    "responseContentType": "application/json",
    "responseSchema": "<schema of the Response>"
  }

Usage

You can install the parser by running:

npm install @intervene/parser

Note: The project is under active development and has not reached v0 yet. Proceed with caution and report any issues you may notice.

FAQs

This looks cool, but what about prod?

You can use the library as is in production but proceed with caution as it is under active development.

If you're interested in a hosted solution, please fill out this quick form, and I will get back to you in no time!

Can it run with GPT 3.5?

You can use GPT 3.5 (or equivalent) which will make this a lot faster, cheaper but less accurate. You can go this route for simpler API calls that need to extract data from the user prompt. You can use the --trivial flag to do this

However, the code can be optimized to use the less capable models for selective tasks. Open to PRs :)

What about other LLMs?

This project works only with OpenAI models for now. I will be exploring other LLMs as well. Let me know which one you want by opening an issue here or feel free to open a PR!

Umm I don't like JavaScript. What about python?

Before porting it to Python or Golang (or both), I want to determine if there are any real-world use cases for this technology. Please try out the CLI, share your thoughts, and I will promptly port it to other languages based on the feedback.

I chose to start with a statically typed language due to the nature of the project. I could have used Golang, but I aimed for simplicity, hence the choice of TypeScript.

I want to contribute

Awesome! PRs and issues are welcome!

Credits

Credits to LangChain and LlamaIndex for the inspiration for some of the techniques used in the project.

Special credits to @rohanmayya for helping lay the foundation for this project.

Readme

Keywords

none

Package Sidebar

Install

npm i @intervene/parser

Weekly Downloads

0

Version

0.1.12

License

none

Unpacked Size

291 kB

Total Files

101

Last publish

Collaborators

  • sudhanshug