-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Could not read directory: .autodoc/docs/markdown/. Did you run sh download.sh
?
#5
Comments
"Failed to get summary" can be caused by a handful of things. Right now logging isn't the best, so apologies for that. Is your code public? I can take a look to see if I can figure what may be causing this error. |
It is not public, sorry. It is frontend code: Typescript and React. I can try it on an open-source project I host and post here accordingly. Edit: I also ran it on backend Typescript code (an API) and I get the same error. |
Please post more info about your environment. |
Node: v19.5.0 Worth noting that I just ran it on the open source project and it worked. |
I'll add better logging to surface the underlying error causing "could not get summary" |
I tried with this repo and the same error was thrown. |
This is issue was fixed by checking node version is 19. I had installed in an older version and chdir to a different repo that changed it. |
I have the same error on one of the computers where I am using autodoc. |
Make sure you install dependencies in 19. /shrug |
I have the same error, which conducted on the following environment. This is what appeared in my terminal. I modifed my private contents with <> tags. Cost estimate to process this repository: $0.01
This is just an estimate. Actual cost may vary.
It recommended that you set a limit in your OpenAI account to prevent unexpected charges.
? Do you want to continue with indexing? Yes
Starting crawl...
⠙ Processing repository...(node:26184) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
⠋ Processing 5 files...Error: Request failed with status code 429
at createError (file:///C:/Users/<USERNAME>/AppData/Roaming/npm/node_modules/@context-labs/autodoc/node_modules/langchain/dist/util/axios-fetch-adapter.js:302:19)
at settle (file:///C:/Users/<USERNAME>/AppData/Roaming/npm/node_modules/@context-labs/autodoc/node_modules/langchain/dist/util/axios-fetch-adapter.js:24:16)
at file:///C:/Users/<USERNAME>/AppData/Roaming/npm/node_modules/@context-labs/autodoc/node_modules/langchain/dist/util/axios-fetch-adapter.js:185:19
at new Promise (<anonymous>)
at fetchAdapter (file:///C:/Users/<USERNAME>/AppData/Roaming/npm/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) {
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 <MY_OPENAI_API_KEY>'
},
method: 'post',
data: '{"model":"gpt-3.5-turbo","temperature":0.1,"top_p":1,"frequency_penalty":0,"presence_penalty":0,"n":1,"stream":false,"messages":[{"role":"user","content":"\\n <PROMPT_WITH_MY_FILE_CONTENTS>"}]}',
url: 'https://api.openai.com/v1/chat/completions'
},
request: Request {
[Symbol(realm)]: { settingsObject: [Object] },
[Symbol(state)]: {
method: 'POST',
localURLsOnly: false,
unsafeRequest: false,
body: [Object],
client: [Object],
reservedClient: null,
replacesClientId: '',
window: 'client',
keepalive: false,
serviceWorkers: 'all',
initiator: '',
destination: '',
priority: null,
origin: 'client',
policyContainer: 'client',
referrer: 'client',
referrerPolicy: '',
mode: 'cors',
useCORSPreflightFlag: false,
credentials: 'same-origin',
useCredentials: false,
cache: 'default',
redirect: 'follow',
integrity: '',
cryptoGraphicsNonceMetadata: '',
parserMetadata: '',
reloadNavigation: false,
historyNavigation: false,
userActivation: false,
taintedOrigin: false,
redirectCount: 0,
responseTainting: 'basic',
preventNoCacheCacheControlHeaderModification: false,
done: false,
timingAllowFailed: false,
headersList: [HeadersList],
urlList: [Array],
url: [URL]
},
[Symbol(signal)]: AbortSignal { aborted: false },
[Symbol(headers)]: HeadersList {
[Symbol(headers map)]: [Map],
[Symbol(headers map sorted)]: null
}
},
response: {
ok: false,
status: 429,
statusText: 'Too Many Requests',
headers: HeadersList {
[Symbol(headers map)]: [Map],
[Symbol(headers map sorted)]: null
},
config: {
transitional: [Object],
adapter: [AsyncFunction: fetchAdapter],
transformRequest: [Array],
transformResponse: [Array],
timeout: 0,
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
maxBodyLength: -1,
validateStatus: [Function: validateStatus],
headers: [Object],
method: 'post',
data: '{"model":"gpt-3.5-turbo","temperature":0.1,"top_p":1,"frequency_penalty":0,"presence_penalty":0,"n":1,"stream":false,"messages":[{"role":"user","content":"\\n <PROMPT_WITH_MY_FILE_CONTENTS>"}]}',
url: 'https://api.openai.com/v1/chat/completions'
},
request: Request {
[Symbol(realm)]: [Object],
[Symbol(state)]: [Object],
[Symbol(signal)]: [AbortSignal],
[Symbol(headers)]: [HeadersList]
},
data: { error: [Object] }
},
isAxiosError: true,
toJSON: [Function: toJSON]
}
Failed to get summary for file <MY_FILE_NAME>
// ...and similar errors continued.
// After that,
Error: Could not read directory: .autodoc\docs\markdown\. Did you run `sh download.sh`?
at processDirectory (file:///C:/Users/82104/AppData/Roaming/npm/node_modules/@context-labs/autodoc/dist/cli/commands/index/createVectorStore.js:33:15)
at RepoLoader.load (file:///C:/Users/82104/AppData/Roaming/npm/node_modules/@context-labs/autodoc/dist/cli/commands/index/createVectorStore.js:57:22)
at createVectorStore (file:///C:/Users/82104/AppData/Roaming/npm/node_modules/@context-labs/autodoc/dist/cli/commands/index/createVectorStore.js:62:34)
at index (file:///C:/Users/82104/AppData/Roaming/npm/node_modules/@context-labs/autodoc/dist/cli/commands/index/index.js:51:11)
✖ Create vector files... In my opinion, the following reponses are the reason of this issue. response: {
ok: false,
status: 429,
statusText: 'Too Many Requests',
headers: HeadersList {
[Symbol(headers map)]: [Map],
[Symbol(headers map sorted)]: null
}, But as you can see in the first line, it only costs $0.01. |
Would love to get a solution for that as well :-) |
Followed the instruction as they're lined out. Everything should be setup correctly.
I keep getting
Failed to get summary for file
while indexing files, and at the end I get:The text was updated successfully, but these errors were encountered: