Git Product home page Git Product logo

codegpt's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

codegpt's Issues

SSL Certificate Issue Although Adding Open API certificate to Inteelij Idea

My request to inspect the code fails with the error below on Intellij Idea:

"PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target"

image

I have added Open API certificate after downloading it to Intellij Idea via Tools-> Server Certificates.

Plugin Settings below:

image

Please advise.

Setting up proxy for Openai access?

Sometimes I work at a site where Codegpt extension does not work because access to the internet is restricted. The way around this is to forward traffic for a website to a proxy running on 192.168.1.123.

Is there a way to use this amazing VScode extension via a proxy server? Thanks!

[ERROR] 404 undefined on Query

Whenever I try to make a query to ChatGPT I get an error outputting [ERROR] 404 undefined.

Query I'm trying to send: "what's up".

W11, VSC Version 1.76.0,
Max Tokens: 1024, Model: ChatGPT, Temperature: 0,5

API Key last used is updated on OpenGPT's site but no response on VSC
image

Missing line while inserting answer

Extension sometime erases template literals while inserting answer of GPT3:

image

Full code with that issue:

// const SipUser = require('../../models/SipUser.model');
const fs = require('fs');
const path = require('path');
const ccQueue = require('../../models/ccQueue.model');
// const {
//   handleResponse,
//   logger,
// } = require('../../../../utils/');
// TODO fix logger?

// This module handles the requests for configuration files 
module.exports = async (req, res) => {
  const params = req.body; 

  // Logging the params
  console.log(params.key_name, params.key_value);

  // Checking if we need to send the full directory or a file
  if (params.key_name === 'name' && params.key_value === 'callcenter.conf') {
    // Getting the queues
    let queues = await ccQueue.find({});
    queues = queues.map((queue) => queue.toXML()); 

    // Setting the response headers
    res.setHeader('Content-Type', 'freeswitch/xml');
    res.status(200);

    // Sending the response
    return res.send(`
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="freeswitch/xml">
  <section name="configuration">
    <configuration name="callcenter.conf" description="CallCenter (generated by **********)">                       
      <settings>

        <param name="odbc-dsn" value="mariadb://Server=secret :)"/>
        <param name="truncate-agents-on-load" value="false"/>
        <param name="truncate-tiers-on-load" value="false"/>

      </settings>

      <queues>

        ${queues.join('\n\n')}

      </queues>

    </configuration> 
  </section>
</document>
  `);
  }

  // Generating the file path
  const fileName = path.join(__dirname, '../../static/autoload_configs', `${params.key_value}.xml`);

  // Checking if that file exists
  if (fs.existsSync(fileName)) {
    // Reading the file
    const config = fs.readFileSync(fileName, 'utf8'); 

    // Setting the response headers
    res.setHeader('Content-Type', 'freeswitch/xml');
    res.status(200);

    // Sending the response
    return res.send(`<?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <document type="freeswitch/xml">
      <section name="configuration">
        ${config}
      </section>
    </document>`);
  }

  // Sending a not found response
  res.setHeader('Content-Type', 'freeswitch/xml');
  res.status(200);
  res.send(`<?xml version="1.0" encoding="UTF-8" standalone="no"?>
  <document type="freeswitch/xml">
    <section name="result">
      <result status="not found" />
    </section>
  </document>`);
};

OpenAI API could not process the query

I used codegpt extension in vscode for somedays without any problem. but today it doesn't work. codegpt chat doesn't answer. when I send a msg, it just shows a notif "stop responding" for some moments. When I write a comment and press ctrl+shift+i the window opens at right side but it doesn't work and just says "OpenAI API could not process the query, try selecting the code and using Ask CodeGPT to write your own query"

I have tried reopening vs, reinstalling codegpt, reentering openai key and didn't succeed in solving the problem.

I uninstalled copilot and gitlenz and some other extensions and then this problem occured. I have no idea if it would be related.

[ERROR] 429

i installed in my laptop and getting the error
[ERROR] 429 [object Object]
but it works well in other laptops.
i tried it many times for a number of days . tried different emails but it didnt work

Default Model didn't work

First of all response is very slow it may takes about 1 min.

All of Models didn't work expect "code-davinci-002", which give me wrong answers.

Error 401 undefined

Type: Feature Request

its showing erroe eveerytime after my input

Extension version: 1.1.2
VS Code version: Code 1.76.2 (ee2b180d582a7f601fa6ecfdad8d9fd269ab1884, 2023-03-14T17:55:54.936Z)
OS version: Windows_NT x64 10.0.22621
Modes:
Sandboxed: No

[ERROR] 404 undefined

This error is coming after running codegpt.

System info: Apple M1 Pro.
using -- code-davinci-002

Please help.

Set API version

Does anyone know if its possible to set api_version like "2024-01-02" In the Azure Openai settings ?

Failed to use Azure OpenAI API

Phenomenon

I entered my API key in CodeGPT: Set API KEY, and ask something. The answers are all `OpenAI API Response was: Error 401``

My Trial

  • I tried to use Genie ChatGPT addon before, and have the same question.
  • I tried to search the fucking website with keyword like Genie Azure, CodeGPT Azure, but got nothing useful.
  • I tried to read the fucking document of Genie and CodeGPT, but none of the two mentioned Azure OpenAI API usage or guidance.
    Maybe because of my poor English reading ability :(

Azure OpenAI API Setting

GPT 35 turbo (the same as setted in CodeGPT)

My Wants

Please Help me with HOW TO FIND the guidance or usage of Azure OpenAI API
If you could solve my problem directly, words fails me to express my gratitude.

Can't set apiKey

I 've installed the extenstion to vs-code from the marketplace and I 'm trying to set my api key and it gets me this error

Screenshot 2023-03-01 at 1 15 34 PM

Version: 1.72.1 (Universal)
OS : Macos Ventura version 13.0 (M1 Chip)

Returns [ERROR] 429 [object Object]

I was excited to try this extension, but after installing and adding my API key if I ask a question in the panel i get [ERROR] 429 [object Object]

[ERROR] 404 undefined

Type: Bug

when typing a query for codeGPT I get the error: 404 undefined

Extension version: 1.1.2
VS Code version: Code 1.85.2 (8b3775030ed1a69b13e4f4c628c612102e30a681, 2024-01-18T06:40:10.514Z)
OS version: Windows_NT x64 10.0.22621
Modes:

"Ask CodeGPT" is not working

Actually when you write a text and try to use Ctrl + Shift + I (or by using Ask CodeGPT) it is returning this:

sk-<> API could not process the query, try selecting the code and using Ask CodeGPT to write your own query

Error 401 undefined

Type: Feature Request

its showing error everytime after my input

Extension version: 1.1.2
VS Code version: Code 1.76.2 (ee2b180d582a7f601fa6ecfdad8d9fd269ab1884, 2023-03-14T17:55:54.936Z)
OS version: Windows_NT x64 10.0.22621
Modes:
Sandboxed: No

CODEGPT gives useless answers and repeats them in an endless loop

@ALL

First of all - thank you for a tool that normally gives very good answers but not today

After a long useless conversation today I received this message from CODEGPT in VsCode:

I suggest you inform the coders responsible for CODEGPT of this failed attempt to help.
You can do this by submitting an issue to the CODEGPT repository on Github.
In the issue, you can include the code block you provided, along with a description of the issue and any other relevant information.
You can also tag the coders responsible for CODEGPT in the issue to ensure they see it.

The code I provided was a preliminary code used to investigate how to use EJS in my file webshop.ejs
I also provide the console output and resulting HTML-code

CODEGPT advised me to use exactly the same code

I tryied multiple times to explain that its advices did not work but it only resulted in an endless loop of questions and replies that was already given and which I had already informed that did not work

I also asked if this could be caused by a bug in EJS but received no relevant answer on that question

It seems that CODEGPT was just as puzzled as me and that's not what is expected, is it?

<%#
  No LI's in UL tag
    https://github.com/timkmecl/codegpt/issues/23  
%>
<%
const dbQuery = function(mysql)  {
  return new Promise((resolve, reject) => {
    con.query(mysql, (err, result) => {
      if (err) {
        reject(err);
      }
      else {
        resolve(result);
      }
    }); 
  });  
}
%>
<h2>Products</h2>
<ul>
  <% 
  dbQuery("SELECT * FROM products")
  .then(products => { 
    console.log("Data received from database: ", products);
    products.forEach(product => {
      console.log("Product name: ", product.name);
      %>
      <li> <%= product.name %> </li>
    <%  } ) } )
  .catch(err => console.log("Error fetching data from database: ", err));
  %>
</ul>

Console output:

Data received from database:  [
  RowDataPacket { id: 1, name: 'Product 1', price: 101 },
  RowDataPacket { id: 2, name: 'Product 2', price: 51 },
  RowDataPacket { id: 3, name: 'Product 3', price: 12 }
]
Product name:  Product 1
Product name:  Product 2
Product name:  Product 3

Resulting html:

<ul>
    
  </ul>

FR: Generate code and refactor it at the same time?

Hello,

loving this plugin. But the code generated by GPT is often very ugly. That's not really a big problem as I normally directly run the 'refactor' action of CodeGPT over it. I wonder if it might be possible to do that in one step:

  • Insert the generated code at the position of the cursor in the editor
  • Afer that, pass the code through GPT again to refactor it

Thank you! :)

Not compatible with VS Code version 1.72.1

image

trying to install and i see the above error:

Can't install 'timekmecl.codegpt3' extension because 
it is not compatible with the current version of 
Visual Studio Code (version 1.72.1).

[ERROR] 429 undefined when using Code-davinci/cushman 2

API key is working, Text-davinci 3 is working fine.

It looks like one of the requests did get through based on the the usage logging but either it was too slow to respond or I missed that one. Tried with big chunks of code and a simple if-statement.
Language is Powershell (7.3).

From OpenAI:
Usage report:
20:15
Local time: 22 mrt 2023 21:15
text-davinci, 4 requests
1,270 prompt + 624 completion = 1,894 tokens
20:20
Local time: 22 mrt 2023 21:20
code-davinci, 1 request
417 prompt + 86 completion = 503 tokens
20:30
Local time: 22 mrt 2023 21:30
text-davinci, 1 request
672 prompt + 248 completion = 920 tokens

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.