Skip to content
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

Adds a '--use-memory' flag to choose memory backend at runtime #957

Merged
merged 2 commits into from
Apr 12, 2023

Conversation

sadmuphin
Copy link
Contributor

@sadmuphin sadmuphin commented Apr 12, 2023

Background

To easily switch between memory backends without the need to edit the .env file

Changes

Adds a --use-memory argument so the user can choose a supported memory backend when running the script

Documentation

I have specified some comments in the memory/__init__.py file

Test plan

Not thoroughly tested, but should work out of the box (hopefully)

PR Quality Checklist

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

@sadmuphin sadmuphin changed the title Adds the ' Adds a '--use-memory' flag to choose memory backend at runtime Apr 12, 2023
@adamnmcc
Copy link

this is available in the env file as MEMORY_BACKEND=local

@luiscosio
Copy link

This should include a modification to the README since it's not documented the use of the environment variable @adamnmcc

@sadmuphin
Copy link
Contributor Author

This PR is primarily supposed to be a QOL update, it's not a replacement for any environment variables.

@luiscosio Correct, and it's not included in the template file, I've added these in #971

@nponeccop nponeccop mentioned this pull request Apr 12, 2023
1 task
@sadmuphin
Copy link
Contributor Author

sadmuphin commented Apr 12, 2023

Just as a heads up if this does get merged (or any maintainers want to merge it) #852, #424 and any other memory backend providers will have to add this code on successful module importation (in memory/__init__.py):

supported_memory.append('<backend>')

@nponeccop
Copy link
Contributor

It's not about if, it's about when. It will get merged in the Batch 3.

@richbeales richbeales merged commit bc75c74 into Significant-Gravitas:master Apr 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants