diff options
author | Nate Sesti <sestinj@gmail.com> | 2023-07-19 00:33:50 -0700 |
---|---|---|
committer | Nate Sesti <sestinj@gmail.com> | 2023-07-19 00:33:50 -0700 |
commit | 1b92180d4b7720bf1cf36dd63142760d421dabf8 (patch) | |
tree | 26e25e005b06526267c2a140c1fbf1cbf822f066 /extension/scripts/replace.py | |
parent | 924a0c09259d25a4dfe62c0a626a9204df45daa9 (diff) | |
parent | a7c57e1d1e4a0eff3e4b598f8bf0448ea6068353 (diff) | |
download | sncontinue-1b92180d4b7720bf1cf36dd63142760d421dabf8.tar.gz sncontinue-1b92180d4b7720bf1cf36dd63142760d421dabf8.tar.bz2 sncontinue-1b92180d4b7720bf1cf36dd63142760d421dabf8.zip |
Merge branch 'main' into config-py
Diffstat (limited to 'extension/scripts/replace.py')
-rw-r--r-- | extension/scripts/replace.py | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/extension/scripts/replace.py b/extension/scripts/replace.py deleted file mode 100644 index 08810243..00000000 --- a/extension/scripts/replace.py +++ /dev/null @@ -1,17 +0,0 @@ -import sys -from gpt_index import GPTSimpleVectorIndex, Document - -def replace_additional_index(info: str): - """Replace the additional index.""" - with open('data/additional_context.txt', 'w') as f: - f.write(info) - documents = [Document(info)] - index = GPTSimpleVectorIndex(documents) - index.save_to_disk('data/additional_index.json') - print("Additional index replaced") - -if __name__ == "__main__": - """python3 replace.py <info>""" - info = sys.argv[1] if len(sys.argv) > 1 else None - if info: - replace_additional_index(info)
\ No newline at end of file |