Skip to content

P0rt/jake-copilot

Repository files navigation

VSCode API Extension

This extension for Visual Studio Code allows you to send requests to your API and receive responses directly within the editor.

For tests

  • Push Start Debugging from Run menu
  • Push Cmd+Shift+P
  • Type in menu Get API Response

Features

Installation

  1. Clone the repository to your computer.
  2. Open the extension folder in VSCode.
  3. Run npm install to install the necessary dependencies.
  4. Press F5 to launch the extension in debug mode.

Usage

  1. Open the command palette (Ctrl+Shift+P or Cmd+Shift+P on Mac).
  2. Type "Get API Response" and press Enter.
  3. View the response from your API in a notification.

TODO

  • Test the extension with the actual API.
  • Register on the Visual Studio Marketplace.
  • Publish the extension on the Visual Studio Marketplace.

API

Your API was built using Flask and Flask-RESTful. Here's its main code:

from flask import Flask, request, jsonify
from flask_restful import Api, Resource

app = Flask(__name__)
api = Api(app)

class Predict(Resource):
    def post(self):
        # Retrieving data from the request
        data = request.get_json(force=True)
        code_input = data.get("code", "")
        output = f"Received: {code_input}. Here will be the output of your model based on the input data."
        return jsonify({"prediction": output})

api.add_resource(Predict, "/predict")

if __name__ == "__main__":
    app.run(debug=True, port=5000)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published