AutoGPT icon indicating copy to clipboard operation
AutoGPT copied to clipboard

augment and make LocalCache memory/embeddings pluggable

Open swyxio opened this issue 1 year ago • 53 comments

Background

The LocalCache memory backend implemented in https://github.com/Torantulino/Auto-GPT/pull/372 used a handrolled implementation of a storage engine, and the embedding strategy was pinned to text-embedding-ada-002 which we may want to change/does cost money/latency

Changes

  • reimplemented LocalCache using Chroma - which also runs either in-memory or persisted, but is well tested and managed.
  • made embeddings swappable to ANY openai embedding model - and uses the Chroma default SentenceTransformers which costs no money

Documentation

in README

Test Plan

testing it locally

no new tests needed since this is a strict upgrade of LocalCache.

PR Quality Checklist

  • [x] My pull request is atomic and focuses on a single change.
  • [x] I have thoroughly tested my changes with multiple different prompts.
  • [x] I have considered potential risks and mitigations for my changes.
  • [x] I have documented my changes clearly and comprehensively.
  • [x] I have not snuck in any "extra" small tweaks changes

swyxio avatar Apr 13 '23 00:04 swyxio

its ready for review :)

swyxio avatar Apr 13 '23 01:04 swyxio

great addition @sw-yx ! I hope it gets merged soon.

aosan avatar Apr 13 '23 01:04 aosan

@sw-yx There are conflicts

nponeccop avatar Apr 13 '23 12:04 nponeccop

whaaat i just made this PR yesterday and there are conflicts haha. will fix!

swyxio avatar Apr 13 '23 17:04 swyxio

We move fast, new conflicts can happen every 5 minutes here :)

nponeccop avatar Apr 13 '23 17:04 nponeccop

@nponeccop i think i fixed the conflict!

swyxio avatar Apr 13 '23 18:04 swyxio

re-fixed new conflicts! @nponeccop what typically happens next?

swyxio avatar Apr 14 '23 21:04 swyxio

@sw-yx There are conflicts now

nponeccop avatar Apr 14 '23 23:04 nponeccop

@nponeccop as far as i can tell i fixed the conflicts as of commit a6928c2. i've just updated my fork to current master but still not seeing any conflicts as of right now!

swyxio avatar Apr 15 '23 06:04 swyxio

@sw-yx There are both conflicts and CI failure now

nponeccop avatar Apr 15 '23 13:04 nponeccop

@nponeccop fixed! mind running CI again?

swyxio avatar Apr 16 '23 03:04 swyxio

@sw-yx CI fails

nponeccop avatar Apr 16 '23 15:04 nponeccop

@nponeccop ok i have addressed the flake issues. i'd be happy to work on better doucmenting contributor guide next so that others dont have this issue

swyxio avatar Apr 16 '23 17:04 swyxio

@sw-yx There are conflicts now

nponeccop avatar Apr 16 '23 18:04 nponeccop

wew that was a big merge. i've updated again.

swyxio avatar Apr 16 '23 18:04 swyxio

@sw-yx There are (minor) conflicts again

nponeccop avatar Apr 16 '23 20:04 nponeccop

re-updated (and checked flake tests)

swyxio avatar Apr 16 '23 20:04 swyxio

@nponeccop re-updated

swyxio avatar Apr 17 '23 06:04 swyxio

This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.

github-actions[bot] avatar Apr 17 '23 15:04 github-actions[bot]

This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.

github-actions[bot] avatar Apr 17 '23 15:04 github-actions[bot]

This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.

github-actions[bot] avatar Apr 17 '23 15:04 github-actions[bot]

Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly.

github-actions[bot] avatar Apr 17 '23 20:04 github-actions[bot]

thank you bot very cool

swyxio avatar Apr 17 '23 21:04 swyxio

This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.

github-actions[bot] avatar Apr 17 '23 22:04 github-actions[bot]

resolved

swyxio avatar Apr 18 '23 06:04 swyxio

Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly.

github-actions[bot] avatar Apr 18 '23 06:04 github-actions[bot]

This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.

github-actions[bot] avatar Apr 18 '23 06:04 github-actions[bot]

updated my fork but not showing on this PR yet for some reason

swyxio avatar Apr 18 '23 14:04 swyxio

Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly.

github-actions[bot] avatar Apr 18 '23 15:04 github-actions[bot]

re updated

swyxio avatar Apr 19 '23 02:04 swyxio