context-labs / autodoc

Experimental toolkit for auto-generating codebase documentation using LLMs
MIT License
1.93k stars 113 forks source link

404s back from OpenAI #31

Open 7-of-9 opened 1 year ago

7-of-9 commented 1 year ago

Any idea why I'd be seeing these 404s?

Failed to get summary for file TokenLib.sol
⠹ Processing 26 files...Error: Request failed with status code 404
    at createError (file:///home/dom/src/_AC/autodoc/node_modules/langchain/dist/util/axios-fetch-adapter.js:302:19)
    at settle (file:///home/dom/src/_AC/autodoc/node_modules/langchain/dist/util/axios-fetch-adapter.js:24:16)
    at file:///home/dom/src/_AC/autodoc/node_modules/langchain/dist/util/axios-fetch-adapter.js:185:19
    at new Promise (<anonymous>)
    at fetchAdapter (file:///home/dom/src/_AC/autodoc/node_modules/langchain/dist/util/axios-fetch-adapter.js:177:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  config: {
    transitional: {
      silentJSONParsing: true,
      forcedJSONParsing: true,
      clarifyTimeoutError: false
    },
    adapter: [AsyncFunction: fetchAdapter],
    transformRequest: [ [Function: transformRequest] ],
    transformResponse: [ [Function: transformResponse] ],
    timeout: 0,
    xsrfCookieName: 'XSRF-TOKEN',
    xsrfHeaderName: 'X-XSRF-TOKEN',
    maxContentLength: -1,
    maxBodyLength: -1,
    validateStatus: [Function: validateStatus],
    headers: {
      Accept: 'application/json, text/plain, */*',
      'Content-Type': 'application/json',
      'User-Agent': 'OpenAI/NodeJS/3.2.1',
      Authorization: 'Bearer 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'
    },
    method: 'post',
    data: '{"model":"gpt-4","temperature":0.1,"top_p":1,"frequency_penalty":0,"presence_penalty":0,"n":1,"stream":false,"messages":[{"role":"user","content":"\\n    You are acting as a code documentation expert for a project called stm_sol.\\n    Below is the code from a file located at `stm_sol`. \\n    Write a detailed technical explanation of what this code does. \\n      Focus on the high-level purpose of the code and how it may be used in the larger project.\\n      Include code examples where appropriate. Keep you response between 100 and 300 words. \\n      DO NOT RETURN MORE THAN 300 WORDS.\\n      Output should be in markdown format.\\n      Do not just list the methods and classes in this file.\\n    Do not say \\"this file is a part of the stm_sol project\\".\\n\\n    code:\\n    // SPDX-License-Identifier: AGPL-3.0-only - (c) AirCarbon Pte Ltd - see /LICENSE.md for Terms\\n// Author: https://github.com/7-of-9\\n// Certik (AD): locked compiler version\\npragma solidity 0.8.5;\\n\\nimport \\"../Interfaces/StructLib.sol\\";\\n\\nimport \\"../StMaster/StMaster.sol\\";\\n\\nlibrary TransferLib {\\n    event TransferedFullSecToken(address indexed from, address indexed to, uint256 indexed stId, uint256 mergedToSecTokenId, uint256 qty, StructLib.TransferType transferType);\\n    event
dahifi commented 1 year ago

Similar issue off of the Obsidian Text Generator Plugin

⠦ Processing 11 folders... Error: Request failed with status code 404
    at createError (file:///Users/bcm/.nvm/versions/node/v19.8.1/lib/node_modules/@context-labs/autodoc/node_modules/langchain/dist/util/axios-fetch-adapter.js:302:19)
    at settle (file:///Users/bcm/.nvm/versions/node/v19.8.1/lib/node_modules/@context-labs/autodoc/node_modules/langchain/dist/util/axios-fetch-adapter.js:24:16)
    at file:///Users/bcm/.nvm/versions/node/v19.8.1/lib/node_modules/@context-labs/autodoc/node_modules/langchain/dist/util/axios-fetch-adapter.js:185:19
    at new Promise (<anonymous>)
    at fetchAdapter (file:///Users/bcm/.nvm/versions/node/v19.8.1/lib/node_modules/@context-labs/autodoc/node_modules/langchain/dist/util/axios-fetch-adapter.js:177:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
nn-dmt commented 1 year ago

Just FYI your secret API key for OpenAI is showing in your thread and you should edit and remove it so nobody can use your API access