Giter VIP home page Giter VIP logo

autopilot's People

Contributors

fjrdomingues avatar hatkyinc2 avatar klaudioz avatar ofir-petrushka avatar ryanmac avatar

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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

autopilot's Issues

Too many tokens in summaries

I just got this error:

Aborting. Too many tokens in summaries. 4593 Max allowed: 3000 /Users/canalescl/personal/autopilot/ui.js:17 throw new Error(message)

is anything I can do?. I have GPT-4 access.

"git reset --hard" triggers summary on all files

Problem
If I do a git reset --hard on a repository, the application detects a gap fill on all files again, even if the content of the files is the same and the indexer starts indexing all files from scratch.

Desired Outcome
If the content of the files is the same, then the database shouldn't need to be updated for those files. This will allow databases to be copied and files to be moved without having to re-index the entire database again.

Configure low temprature for GPT

I think we are currently using the default, for most of the work here we probably want a low temperature to get more consistency and expected results and fewer hallucinations.

Basically, a high temperature is creative and a low one is closer to a deterministic, high-probability result.

gpt-3.5-turbo behaving differently

Openai must have changed something on the model and now the model "refuses" to answer in JSON.
Also tested on chatgpt, with the same result.
Before it was working almost 100% of the time.

We may be able to solve this by using the "gpt-3.5-turbo-0301" version of the model. Haven't tested it yet.

Followed install , installed

I installed the package with npm install (and configured .env with the API key and everything) but I get this error:

(seedoo_v2) ✘ alexlan@alexsmbp  ~/Code/autopilot   main ±  node ui -t "TEST"
/Users/alexlan/Code/autopilot/node_modules/langchain/prompts.js:1
(function (exports, require, module, __filename, __dirname) { export * from './dist/prompts/index.js'
^^^^^^

SyntaxError: Unexpected token export
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:617:28)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object. (/Users/alexlan/Code/autopilot/agents/genericAgent.js:1:90)

Bad request

I was testing autopilot and it was working well. After that I did a git pull, ran again npm i and I tried with a new project it and I got this multiple times, very fast.

/Users/canalescl/personal/replit/offrs-chatbot/components/layout.tsx 55
Calling GPT. Model:  gpt-3.5-turbo
{
  status: 400,
  statusText: 'Bad Request',
  headers: {
    date: 'Mon, 10 Apr 2023 15:37:21 GMT',
    'content-type': 'application/json',
    'content-length': '162',
    connection: 'keep-alive',
    'access-control-allow-origin': '*',
    'openai-organization': 'user-42uht4qzmlzlaw3fnp1yqxpo',
    'openai-processing-ms': '5',
    'openai-version': '2020-10-01',
    'strict-transport-security': 'max-age=15724800; includeSubDomains',
    'x-ratelimit-limit-requests': '3500',
    'x-ratelimit-remaining-requests': '3499',
    'x-ratelimit-reset-requests': '17ms',
    'x-request-id': '1c50a35957cb1ea475241dd8b40003b3',
    'cf-cache-status': 'DYNAMIC',
    server: 'cloudflare',
    'cf-ray': '7b5c12136830a02c-SLC',
    'alt-svc': 'h3=":443"; ma=86400, h3-29=":443"; ma=86400'
  },
  config: {
    transitional: {
      silentJSONParsing: true,
      forcedJSONParsing: true,
      clarifyTimeoutError: false
    },
    adapter: [Function: httpAdapter],
    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 ====REDACTED====',
      'Content-Length': 571
    },
    method: 'post',
    data: '{"model":"gpt-3.5-turbo","messages":[{"role":"user","content":"\\nTASK: Create a summary of the file below. Use as few words as possible while keeping the details. Use bullet points\\n*** FILE CONTENT START ***\\nimport { SiteHeader } from \\"@/components/site-header\\"\\n\\ninterface LayoutProps {\\n  children: React.ReactNode\\n}\\n\\nexport function Layout({ children }: LayoutProps) {\\n  return (\\n    <>\\n      <SiteHeader />\\n      <main>{children}</main>\\n    </>\\n  )\\n}\\n\\n*** FILE CONTENT END ***\\n"}],"temperature":null,"presence_penalty":null,"frequency_penalty":null}',
    url: 'https://api.openai.com/v1/chat/completions'
  },
  request: <ref *1> ClientRequest {
    _events: [Object: null prototype] {
      abort: [Function (anonymous)],
      aborted: [Function (anonymous)],
      connect: [Function (anonymous)],
      error: [Function (anonymous)],
      socket: [Function (anonymous)],
      timeout: [Function (anonymous)],
      finish: [Function: requestOnFinish]
    },
    _eventsCount: 7,
    _maxListeners: undefined,
    outputData: [],
    outputSize: 0,
    writable: true,
    destroyed: true,
    _last: false,
    chunkedEncoding: false,
    shouldKeepAlive: true,
    maxRequestsOnConnectionReached: false,
    _defaultKeepAlive: true,
    useChunkedEncodingByDefault: true,
    sendDate: false,
    _removedConnection: false,
    _removedContLen: false,
    _removedTE: false,
    strictContentLength: false,
    _contentLength: 571,
    _hasBody: true,
    _trailer: '',
    finished: true,
    _headerSent: true,
    _closed: true,
    socket: TLSSocket {
      _tlsOptions: [Object],
      _secureEstablished: true,
      _securePending: false,
      _newSessionPending: false,
      _controlReleased: true,
      secureConnecting: false,
      _SNICallback: null,
      servername: 'api.openai.com',
      alpnProtocol: false,
      authorized: true,
      authorizationError: null,
      encrypted: true,
      _events: [Object: null prototype],
      _eventsCount: 9,
      connecting: false,
      _hadError: false,
      _parent: null,
      _host: 'api.openai.com',
      _closeAfterHandlingError: false,
      _readableState: [ReadableState],
      _maxListeners: undefined,
      _writableState: [WritableState],
      allowHalfOpen: false,
      _sockname: null,
      _pendingData: null,
      _pendingEncoding: '',
      server: undefined,
      _server: null,
      ssl: [TLSWrap],
      _requestCert: true,
      _rejectUnauthorized: true,
      timeout: 5000,
      parser: null,
      _httpMessage: null,
      [Symbol(res)]: [TLSWrap],
      [Symbol(verified)]: true,
      [Symbol(pendingSession)]: null,
      [Symbol(async_id_symbol)]: -1,
      [Symbol(kHandle)]: [TLSWrap],
      [Symbol(lastWriteQueueSize)]: 0,
      [Symbol(timeout)]: Timeout {
        _idleTimeout: 5000,
        _idlePrev: [TimersList],
        _idleNext: [TimersList],
        _idleStart: 3407,
        _onTimeout: [Function: bound ],
        _timerArgs: undefined,
        _repeat: null,
        _destroyed: false,
        [Symbol(refed)]: false,
        [Symbol(kHasPrimitive)]: false,
        [Symbol(asyncId)]: 51,
        [Symbol(triggerId)]: 49
      },
      [Symbol(kBuffer)]: null,
      [Symbol(kBufferCb)]: null,
      [Symbol(kBufferGen)]: null,
      [Symbol(kCapture)]: false,
      [Symbol(kSetNoDelay)]: false,
      [Symbol(kSetKeepAlive)]: true,
      [Symbol(kSetKeepAliveInitialDelay)]: 1,
      [Symbol(kBytesRead)]: 0,
      [Symbol(kBytesWritten)]: 0,
      [Symbol(connect-options)]: [Object]
    },
    _header: 'POST /v1/chat/completions HTTP/1.1\r\n' +
      'Accept: application/json, text/plain, */*\r\n' +
      'Content-Type: application/json\r\n' +
      'User-Agent: OpenAI/NodeJS/3.2.1\r\n' +
      'Authorization: Bearer ====REDACTED====\r\n' +
      'Content-Length: 571\r\n' +
      'Host: api.openai.com\r\n' +
      'Connection: keep-alive\r\n' +
      '\r\n',
    _keepAliveTimeout: 0,
    _onPendingData: [Function: nop],
    agent: Agent {
      _events: [Object: null prototype],
      _eventsCount: 2,
      _maxListeners: undefined,
      defaultPort: 443,
      protocol: 'https:',
      options: [Object: null prototype],
      requests: [Object: null prototype] {},
      sockets: [Object: null prototype] {},
      freeSockets: [Object: null prototype],
      keepAliveMsecs: 1000,
      keepAlive: true,
      maxSockets: Infinity,
      maxFreeSockets: 256,
      scheduling: 'lifo',
      maxTotalSockets: Infinity,
      totalSocketCount: 1,
      maxCachedSessions: 100,
      _sessionCache: [Object],
      [Symbol(kCapture)]: false
    },
    socketPath: undefined,
    method: 'POST',
    maxHeaderSize: undefined,
    insecureHTTPParser: undefined,
    path: '/v1/chat/completions',
    _ended: true,
    res: IncomingMessage {
      _readableState: [ReadableState],
      _events: [Object: null prototype],
      _eventsCount: 4,
      _maxListeners: undefined,
      socket: null,
      httpVersionMajor: 1,
      httpVersionMinor: 1,
      httpVersion: '1.1',
      complete: true,
      rawHeaders: [Array],
      rawTrailers: [],
      aborted: false,
      upgrade: false,
      url: '',
      method: null,
      statusCode: 400,
      statusMessage: 'Bad Request',
      client: [TLSSocket],
      _consuming: false,
      _dumped: false,
      req: [Circular *1],
      responseUrl: 'https://api.openai.com/v1/chat/completions',
      redirects: [],
      [Symbol(kCapture)]: false,
      [Symbol(kHeaders)]: [Object],
      [Symbol(kHeadersCount)]: 34,
      [Symbol(kTrailers)]: null,
      [Symbol(kTrailersCount)]: 0
    },
    aborted: false,
    timeoutCb: null,
    upgradeOrConnect: false,
    parser: null,
    maxHeadersCount: null,
    reusedSocket: true,
    host: 'api.openai.com',
    protocol: 'https:',
    _redirectable: Writable {
      _writableState: [WritableState],
      _events: [Object: null prototype],
      _eventsCount: 3,
      _maxListeners: undefined,
      _options: [Object],
      _ended: true,
      _ending: true,
      _redirectCount: 0,
      _redirects: [],
      _requestBodyLength: 571,
      _requestBodyBuffers: [],
      _onNativeResponse: [Function (anonymous)],
      _currentRequest: [Circular *1],
      _currentUrl: 'https://api.openai.com/v1/chat/completions',
      [Symbol(kCapture)]: false
    },
    [Symbol(kCapture)]: false,
    [Symbol(kBytesWritten)]: 0,
    [Symbol(kEndCalled)]: true,
    [Symbol(kNeedDrain)]: false,
    [Symbol(corked)]: 0,
    [Symbol(kOutHeaders)]: [Object: null prototype] {
      accept: [Array],
      'content-type': [Array],
      'user-agent': [Array],
      authorization: [Array],
      'content-length': [Array],
      host: [Array]
    },
    [Symbol(errored)]: null,
    [Symbol(kUniqueHeaders)]: null
  },
  data: {
    error: {
      message: "None is not of type 'number' - 'presence_penalty'",
      type: 'invalid_request_error',
      param: null,
      code: null
    }
  }
}

Also, the log is showing the Authorization: Bearer <OPENAI_API_KEY>. It'd be hidden.

Add Self-hosted models

Why
Users don't want to send their code to OPENAI

What
Allow users to connect to different models. Maybe asking users to host the model and provide an API?

Put Summaries on a Vector Store

Why
It may be more optimal to store summaries on a vector DB and search for relevant summaries with a semantic search.

What
Transform summaries in embeddings, store them in a vector DB and fetch them based on a task.

Move to TypeScript?

I'm wondering if there's any interest in this? I wouldn't mind contributing a PR.

Testing post auto-updates

Post auto-patching, we want an agent to to run tests/validations optionally

The first simple version is to define it in the config and run them.
The second phase is, if that failed, to feed the errors back to an agent to fix the code.
The third phase could include detecting what to run alone based on the README (or code), here is a sample prompt that seems to work:

What commands can I use to run things in this project (multiple commands ok. both testing and normal runs. only commands that appear above. Ignore package installs.)
Please return a valid JSON format that includes each command, example format
{
  "commands": [
     "command 1",
     "command 2",
   ]
}
Code only. Don't explain. No comments.

Returned:

{
"commands": [
"node createSummaryOfFiles.js --all",
"node ui.js",
"node ui.js -i"
]
}

Summaries are not using .env SUMMARY_MODEL

Problem
When autopilot generates new summaries for files, it's not using the model specified in the .env file with the variable SUMMARY_MODEL. Instead, it seems that it's using the CHEAP_MODEL variable.

Desired Outcome
The agent that processes summaries should use the model specified in the SUMMARY_MODEL environment variable

return number of tokens spent on a task

I need the main function on ui.js to also return the number of tokens that were spent on a task.
There are already modules in the project to calculate the number of tokens for all gpt calls, but those counts don't happen on the ui.js file. Use the ui.js on the root of the project.
There should be a variable that stores the total tokens, on the ui.js, and that gets incremented each time there's an API call to gpt, which happens on different modules. You also need to make sure that the app gets the value from the module that runs gpt calls and is able to provide that context to the ui.js file.

Present a solution to implement this on the current app.

Incorrect File Extensions Recommended by Autopilot

Hello, thanks for such a great project. I see it has big future!
ISSUE:
All of my project files are saved with the .js extension, but Autopilot is suggesting that I use other file extensions such as .php and .py. This is causing confusion and may lead to errors in my code.

I have noticed that the following files have been recommended with the wrong file extensions:

CONSOLE LOG:
Relevant Files are: [
{
path: 'licenses_table.php',
reason: 'This file likely handles the creation and activation of licenses, so it will need to be updated to include the new columns.'
},
{
path: 'products_table.php',
reason: 'This file likely handles the creation and activation of products, so it will need to be updated to include the new columns.'
},
{
path: 'retrieve_license_info.php',
reason: 'This file likely retrieves license information, so it may need to be updated to include the new columns.'
},
{
path: 'update_license_info.php',
reason: 'This file likely updates license information, so it may need to be updated to include the new columns.'
}
]
node:fs:594
handleErrorFromBinding(ctx);

It would be helpful if Autopilot could recommend file extensions that match the current file types being used in my project. In addition, I received the following error message in relation to this issue:

node:fs:594 handleErrorFromBinding(ctx);
image

image

And also, this strage behaviour.
image

(test) Change get task message

When the app asks the user to enter their task, the user's prompt should say "Describe your task in detail", instead of what we are asking currently.

Task: Break when getFiles agent can't descide on a file to edit

When the getFiles can't decide on a file to edit from the summaries it's making up texts.
When the UI tries to get these files it crashes.

Preferred solution:

  • Expend the getFiles agent output options to say it doesn't know which files to work on.
  • When either the getFiles agent returns such an output or when we fail to grub files request, end with a proper user message.

The 2nd point by itself is also a move forward by itself.

Example issue
#114

Error: ENOENT: no such file or directory, open '/Users/maximiliandoelle/Projects/selling/N/A'

File too BIG

Problem

10:04: Updated summary for routes/recipe.js
Processing file: routes/user.js
File too BIG

Solution
Split bigger files

Suggestion: Package as global tool

Thanks so much for doing this as I'm sure I'm not the only one who has had this on their mental "to-do" list for weeks.

One thing that might help in usage is if it was callable from any directory like "index-code" and "with-code" so you can move around your projects and index, act within that directory like the incredibly useful "ai-shell" from @builder.io/ai-shell. Maybe even as an extension to that project as it's already there.

If my boss wasn't looming, yes, I'd try. One day.

Review file paths in summaries

When I update the summary files, I get a full path, we should use a relative path always from CODE_DIR.
Add test coverage on some of these functions that decide on the paths.

Split summaries into Chunks

split the summaries into chunks up to max size and loop the chunks on prompts to ask the questions and accept an empty option

something like

MAX_CHUNK_LENGTH=1000
summary_chunks=[]

chunks=[] //summary_chunks
current_chunk=[];
current_chunk_length= 0
for (summary of summaries) {
  current_summary_length:=summaries.length()
  if current_summary_length>MAX_CHUNK_LENGTH{throw new ERROR('single summary is too big');
  if (current_chunk_length+current_summary_length) >MAX_CHUNK_LENGTH{
     chunks.push(current_chunk);
     current_chunk=[];
     current_chunk_length=0;
  }else{
    current_chunk_length=current_chunk_length+current_summary_length
    current_chunk.push(summary)
  }
}
// push last chunk

summary_chunks would have a summary split, might be one file each or might be all the files in one as now
And loop on summary_chunks and ask almost the same current prompt

Error: ENOENT: no such file or directory

Task: move the sendEmail function into it's own script sendEmail.js in the modules folder
Summaries found in the database: 4
Tokens in Summaries: 402
(agent) getRelevantFiles
Calling GPT. Model: gpt-3.5-turbo
Total tokens used: 4460 Total Cost: 0.01$
node:fs:601
handleErrorFromBinding(ctx);
^

Error: ENOENT: no such file or directory, open '/Users/maximiliandoelle/Projects/selling/N/A'
at Object.openSync (node:fs:601:3)
at Object.readFileSync (node:fs:469:35)
at getFiles (/Users/maximiliandoelle/Projects/autopilot/modules/fsInput.js:107:27)
at main (/Users/maximiliandoelle/Projects/autopilot/ui.js:215:17)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
errno: -2,
syscall: 'open',
code: 'ENOENT',
path: '/Users/maximiliandoelle/Projects/selling/N/A'
}

Node.js v18.16.0

Error: SQLITE_ERROR: no such table: files

node ui -i
node:internal/process/promises:288
triggerUncaughtException(err, true /* fromPromise */);
^

Error: SQLITE_ERROR: no such table: files
--> in Database#all('\nSELECT path, hash, timestamp \nFROM files\n', [Function (anonymous)])
at files (/Users/maxmustermann/Projects/autopilot/modules/db.js:114:12)
at new Promise ()
at getDBFiles (/Users/maxmustermann/Projects/autopilot/modules/db.js:113:19)
at codeBaseGapFill (/Users/maxmustermann/Projects/autopilot/modules/codeBase.js:35:25)
at main (/Users/maxmustermann/Projects/autopilot/ui.js:172:25)
at Object. (/Users/maxmustermann/Projects/autopilot/ui.js:249:30)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
at Module.load (node:internal/modules/cjs/loader:1117:32) {
errno: 1,
code: 'SQLITE_ERROR',
__augmented: true
}

Self correcting / Auto validating code changes on patched project

This is for post auto applier.
As we know the AI might make code with mistakes, but by feeding it back errors, it can correct itself pretty well normally.

Was playing with this idea, first phase is to discover what to run

Prompt template

{README.md content / other project readme}

What commands can I use to run things in this project (multiple commands ok. both testing and normal runs. only commands that appear above. Ignore package installs.)
Please return a valid JSON format that includes each command, example format
{
  "commands": [
     "command 1",
     "command 2",
   ]
}
Code only. Don't explain. No comments.

Example output from chatGPT

{
"commands": [
"node createSummaryOfFiles.js --all",
"node ui.js",
"node ui.js -i"
]
}

We can execute each of these commands and take back the input and ask something like:
Does this output include an error? (.... offer a fix or say no.... might loop back to some stage in the process that has a task to fix the code so it can pick other files....)

We might also want to save this to some CODE_DIR/.autopilot
And allow people to edit it if they want to customize it in a second phase.

After #34

Bug: Summaries no longer loading

Getting Summary
Files found: []
No matching files found.
Tokens in Summaries: 1

Not sure which Patch on the last day added the issue

Error on initial run "node createSummaryOfFiles --all"

Fresh install and setup the .env file. When running:
node createSummaryOfFiles --all
I get the following error:

/autopilot/modules/fsInput.js:4
const ignoreList = process.env.IGNORE_LIST.split(',');
                                           ^

TypeError: Cannot read properties of undefined (reading 'split')

My .env file is setup as follows:

# What files do you want to process?
FILE_EXTENSIONS_TO_PROCESS=.json,.swift
IGNORE_LIST=.env,.xcdatamodeld

(test) Change get task message

When we ask the user to enter their task, it should say "Describe your task in detail", instead of what we are asking currently.

error

node:fs:601
handleErrorFromBinding(ctx);
^

Error: ENOENT: no such file or directory, open 'app.js'
at Object.openSync (node:fs:601:3)
at Object.readFileSync (node:fs:469:35)
at getFiles (/root/folder/autopilot/modules/summaries.js:62:28)
at main (/root/folder/autopilot/ui.js:137:17)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
errno: -2,
syscall: 'open',
code: 'ENOENT',
path: 'app.js'
}

Move include/exclude files lists to projects (CODE_DIR/.autopilot)

Move include/exclude files lists to projects (CODE_DIR/.autopilot)

Probably some project/.autopilot/config
Assuming we want one autopilot to run on many projects and we want to use a -d to look at different projects, they need to have their own config.
That config should be shared between users of autopilot if there are any.
This is a common pattern for coding tools. (code validators, CI etc)

while currently this ticket talks about the existing include/exclude lists, we see the future use of this directory in other tasks
the local DB file and/or vector DB.(#70, #69)
testing/validation parameters. (#75)

Single interface future

Like nice to have feature would be to just have one executable.
A project that doesn't have the summary files should just trigger scanning for it.
It could still do the tracking files.
But I would more like to see some identifier saved either in the fields or an index that knows the version that was scanned. (the summary was produced from), so it can re-run the summary for files that changed when the scanner wasn't on.
This would be more user-friendly as they don't need to know about the scanner as a special component.

Discoussion: Next steps after results

I guess we are still in kinda discovery stage...

I'm thinking after a code patch is suggested, what is next? currently, it's just pointing to a result file.
What I think would be nice to have is a chat continuation where the solution is lets say printed to screen and than the user can either:

  1. Apply the change.
  2. Ask for changes to the current solution. (renaming function/var is an easy example, no need to feed files again, just the current suggestion)
  3. Start over (new task text, basically loop to the start).
    (loopback)
    so kinda continues mode

maybe with --felling-luky which is a YOLO - just apply change automatically

Store summaries in a sqlite DB

Why
Saving summaries in files doesn't allow to add metadata in a reliable way

What
Store the summaries in a SQL DB.
Add a hash to check when summaries are outdated

No matching files found in the database. Indexing is required.

Do I maybe have to run some kind of initialisation command that I am missing?

No matching files found in the database. Indexing is required.
/Users/maximiliandoelle/Projects/autopilot/modules/summaries.js:76
throw new Error("Cannot run without summaries. Indexing is required.");
^

Error: Cannot run without summaries. Indexing is required.
at readAllSummaries (/Users/maximiliandoelle/Projects/autopilot/modules/summaries.js:76:11)
at async getSummaries (/Users/maximiliandoelle/Projects/autopilot/modules/summaries.js:98:21)
at async main (/Users/maximiliandoelle/Projects/autopilot/ui.js:205:21)

Node.js v18.16.0

Provide better UI feedback

Calling GPT. Model:  gpt-3.5-turbo
Total tokens used: 3593 Total Cost: 0.01$
Calling GPT. Model:  gpt-3.5-turbo
Total tokens used: 4920 Total Cost: 0.01$
Calling GPT. Model:  gpt-3.5-turbo
Total tokens used: 5817 Total Cost: 0.01$
Calling GPT. Model:  gpt-3.5-turbo
Total tokens used: 6595 Total Cost: 0.01$
Calling GPT. Model:  gpt-3.5-turbo
Total tokens used: 8446 Total Cost: 0.02$

Calling different agents and/or different files should provide some context to the user.

Something in the cost calculation is totally broken

Calling GPT. Model: gpt-3.5-turbo
Total tokens used: 15814 Total Cost: 0.80$

15814 * 0.002 / 1000 = 0.031628$

Oh I think you're adding the costs, while also adding the tokens and recalculating the costs

    totalTokensUsed += usage.total_tokens; // increment total tokens used
    cost += calculateTokensCost(GPTModel, promptTokens, completionTokens, totalTokensUsed)

So you add the tokens across the process
but than the cost is already the total cost from calculateTokensCost
but you also add the last cost to the current cost
should choose either, not both, either add the costs but don't use the totalTokens across the project, just the current file
or don't add cost to cost, just recalculate based on totalTokens that has already been aggregated

(btw did you look at langchain as a possible framework for this?..)

Context Overrun

I pointed auto-pilot at a medium Typescript project, 73 files in total. It indexed them (love the switch to a db for this) and when I gave a pretty broad prompt like "review each file and add types where they aren't specified" it quickly hit an "This model's maximum context length is 4097 tokens. However, you requested 5831 tokens" error, understandable, I wait for a GPT-4 key on the edge of my seat. But when I narrowed the task to a single file, it continued to show the same context error. It seems like the summary of files is included in the context no matter the task, is that right?

Thanks

Idea: Add GitHub repo support

This is a fantastic tool. In addition to local repos, I'd love to see support for remote repos. Ideally, multiple. In this way, autopilot could build context around one or more local or remote repos.

No files found [Windows 11]

.ai.txt files create sucessfully

image

No matching files found. Try running node createSummaryOfFiles first.

image

I'm on Windows.
In the .env file, I have tried

  • relative paths:
    CODE_DIR=../Lamassu-Licensing-Server/
  • Normal windows filepath:
    CODE_DIR=C:\GitTests\Lamassu-Licensing-Server\
  • And forward slash
  • CODE_DIR=C:/GitTests/Lamassu-Licensing-Server/

A new logs file per task

A log file is created for each time the app runs. This works fine when a user inputs a task using the terminal but it's not ideal for running the app on a server. Since the app doesn't stop running between tasks, it keeps logging everything on the same file. I would like a log file created for each task the app does. What changes are needed to the app to make that happen?

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.