Git Product home page Git Product logo

gpt-npm-cli's Introduction

gpt-npm-cli v0.1.5

A npm package that uses OpenAI + Langchain to perform convenient commands in the terminal.

Get Started

Ensure that typescript is installed globally npm install -g typescript.

To get started with the project clone the repository and run npm i & npm run build & npm install -g . within the project root.

Mac or Linux users may have to run sudo before some of these commands.

Calling the gptcli command from the command-line will run the CLI.

For updates simply run git pull & npm i & npm run build within the project root.

It is important to set your keys to expect full functionality. run the gptcli config command for more information.

Example: setting the openai key

gptcli config openai <key>

Usage

The following is a list of commands currently configured within the gptcli:

  • gptcli config: Configures environment variables required to run programs within the CLI, it is recommended that you set any required variables through this command before using the CLI.
  • gptcli summary: Summarizes text and webpage contents, uses map reduce to ensure no limits are encountered for the text
  • gptcli translate: Translates the input text to a desired language.
  • gptcli understand: Parses a webpage and allows the user to ask questions about its contents in chat format.
  • gptcli chat: Runs a chat interface, limited to 1 step of reasoning per message.
  • gptcli prompt: Answers a single prompt with no history. Can perform complex multi-step reasoning.

Environment Tools

Additional envrionment variables can be set to enabled agents with the following functionalities:

  • Search Functionality: Provided thorugh SerpAPI or ValueSerp
  • Live Stock Price Functionality: Provided thorugh Finnhub

The following commands can be improved by setting Environment Tools:

  • gptcli prompt
  • gptcli chat

Envrionment Variables:

  # Sets the SERPAPI_API_KEY, enables search functionality
  > gptcli config serpapi <key> 

  # Sets the VALUESERP_API_KEY, enables search functionality
  > gptcli config valueserp <key> 

  # Sets the FINNHUB_API_KEY, enables live stock price functionality
  > gptcli config finnhub <key>

Help

For more information run the gptcli help command.

gpt-npm-cli's People

Contributors

ibtesam-mahmood avatar mkohler4 avatar

Stargazers

Nikkon avatar  avatar Liam Cooke avatar Joshua Alanis avatar

Watchers

James Cloos avatar Kostas Georgiou avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.