Stability-AI / StableLM

StableLM: Stability AI Language Models
Apache License 2.0
15.85k stars 1.04k forks source link

failed to detect simple syntax code errors #52

Closed rosolinol closed 1 year ago

rosolinol commented 1 year ago

hi, just did few tests on https://huggingface.co/spaces/stabilityai/stablelm-tuned-alpha-chat just copied some random code on github and removed some stuff

what is wrong with this code?

const express = require("express");
const cors = require("cors");

const app = express();

var corsOptions = {
  origin: "http://localhost:8081"
};

app.use(cors(corsOptions));
app.use(express.json());
app.use(express.urlencoded({ extended: true }));
app.get("/", (req, res) => {
  res.json({ message: "Welcome to bezkoder application."
});
require("./app/routes/tutorial.routes.js")(app);
const PORT = process.env.PORT || 8080;
app.listen(PORT, () => {
  console.log(`Server is running on port ${PORT}.`);
});

and it fails to detect the problem response:

There doesn’t seem to be anything necessarily wrong with the code provided, but it is missing some important details such as defining the routes, setting up the server and client correctly, and ensuring that all necessary libraries and dependencies are installed. Additionally, there might be errors or warnings that could be causing issues.

chatgpt response

There seems to be an error in the code.

In the app.get() method, the response object res.json() has an unclosed bracket for the object passed in. It should be closed with a curly brace "}" like this:

app.get("/", (req, res) => {
  res.json({ message: "Welcome to bezkoder application." });
});

Without the closing brace, the code will result in a syntax error.

that being said can someone help me please? i'm looking to have some type of AI for specific coding languages and remove rest of unnecessary data, to help on the code and debug, for nodejs, php if anyone could give me some suggestions what steps to take that i can achieve this?! would mean a lot thank you

mcmonkey4eva commented 1 year ago

The current version of StableLM is an alpha release that is not great at answering questions yet, especially not tough detail-focused ones like this. Future releases should slowly do better and better over time.