mirror of
https://github.com/wassname/stampy-chat.git
synced 2026-09-17 12:50:20 +08:00
22 lines
568 B
Python
22 lines
568 B
Python
import numpy as np
|
|
import pickle
|
|
import openai
|
|
|
|
import config
|
|
from semantic_search import AlignmentSearch
|
|
from settings import PATH_TO_DATASET
|
|
|
|
openai.api_key = config.OPENAI_API_KEY
|
|
|
|
|
|
def main():
|
|
with open(PATH_TO_DATASET, 'rb') as f:
|
|
dataset = pickle.load(f)
|
|
AS = AlignmentSearch(dataset=dataset)
|
|
prompt = "What would be an idea to solve the Alignment Problem? Name the Lesswrong post by Quintin Pope that discusses this idea."
|
|
answer = AS.search_and_answer(prompt, 3, HyDE=False)
|
|
print(answer)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main() |