3 ms·
I'm guessing langchain / llamaindex + openai API?
by lxe 4y ago
I'm guessing langchain / llamaindex + openai API?
- nextworddev 4y agoIt’s a great mystery why people rave about Langchain library. I found it to be really bloated and verbose syntax makes it hard to understand what it’s doing unless you are digging into the code base. Poorly documented, too
- ukuina 4y agoHave you tried Deepset Haystack?
- madmax108 4y agoWhat alternatives exist today? Honestly, I think langchain just fills a void for having a more streamlined "api" for LLM-driven app workflows which is why it's hyped. Plus the fact that they have bindings for both JS and Python makes it easy to get up and running and building custom "agents" for different tasks.
- TrapLord_Rhodo 4y agolol - Yeah, I could write this in 20 lines. I have it answering a list of questions in an excel from three different 'Frames of mind' by passing three different directory'swith different content in each to get three different responses i can craft together. def excelGPT(self, dir, excel_file, sheet): #my GPT Key os.environ['OPENAI_API_KEY'] = 'sk- #Working Directory for training # root = root_folder1 = documents1 = SimpleDirectoryReader(root_folder1).load_data() index1 = GPTSimpleVectorIndex(documents1) root_folder2 = documents2 = SimpleDirectoryReader(root_folder2).load_data() index2 = GPTSimpleVectorIndex(documents2) root_folder3 = documents3 = SimpleDirectoryReader(root_folder3).load_data() index3 = GPTSimpleVectorIndex(documents3) file_name = dir + excel_file df = pd.read_excel(file_name, sheet_name=sheet) GSA_answer_array = [] basic_answer_array = [] QA_answer_array = [] df_series = df.iloc[:,0] for i,x in enumerate(df_series): print("This is the index ", i) print(x) GSA_response = index1.query(x) basic_response = index2.query(x) QA_response = index3.query(x) GSA_answer_array.append(str(GSA_response)) basic_answer_array.append(str(basic_response)) QA_answer_array.append(str(QA_response)) self.zip_to_docv2(dir, "Gippie_Response.docx", df_series, GSA_answer_array, basic_answer_array, QA_answer_array)