Code Monkey home page Code Monkey logo

gptlsp's Introduction

Project Title

This project is a command-line tool written in Go. It interacts with the OpenAI API to perform file and text operations based on user input.

Motivation

The motivation behind this project is to leverage the power of OpenAI's GPT-3 model to assist with file and text operations, making these tasks more efficient and intuitive.

OpenAI Functions

In this project, we use several OpenAI functions to perform common coding tasks. These functions are defined in functions.go file. We have functions for getting the current time, listing files in a specified directory, reading files at given paths, and writing to a file at a given path. These functions are called based on the responses generated by the GPT-3 model in response to user input. This allows us to leverage the power of machine learning to automate and simplify file and text operations.

Technical Description

This application includes several key components:

  1. functions.go: This file defines several functions for getting the current time, listing files in a specified directory, reading files at given paths, and writing to a file at a given path. It also includes a function for handling errors.

  2. main.go: This is the main entry point for the application. It loads environment variables from a .env file, instantiates a client using the OpenAI API key, and then runs a REPL (Read-Eval-Print Loop).

  3. nesting.go: This file defines functions for analyzing and modifying files in a project. It uses the OpenAI GPT-3 model to generate responses based on user input.

  4. repl.go: This file contains the logic for the REPL. It takes user input, sends it to the GPT-3 model, and outputs the model's response. It also executes the relevant function based on the model's response.

  5. go.mod and go.sum: These are standard Go files that manage the project's dependencies. Dependencies include the go-openai, go-lsp, and godotenv packages.

Usage

Run the application from the command line. Ensure that you have set the necessary environment variables in a .env file.

Model Links

gptlsp's People

Contributors

pawalt avatar

Stargazers

Jihun (James) Doh avatar Max Justus Spransy avatar Trevin avatar William Goeller avatar Tim Kersey avatar Leo avatar

Watchers

William Goeller avatar  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.