At its core, LangChain is a framework built around LLMs. We can use it for chatbots, Generative Question-Answering (GQA), summarization, and much more.
The core idea of the library is that we can “chain” together different components to create more advanced use cases around LLMs.
Feature list: https://langchain.com/features.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# original post: https://rentry.org/sd-loopback-wave | |
# original author: https://rentry.org/AnimAnon | |
import os | |
import platform | |
import numpy as np | |
from tqdm import trange | |
import math | |
import subprocess as sp | |
import string | |
import random |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# To run you'll need some secrets: | |
# 1. SERPAPI_API_KEY secret in env var - get from https://serpapi.com/ | |
# 2. OPENAI_API_KEY secret in env var - get from https://openai.com | |
import streamlit as st | |
import json, os | |
from langchain.prompts import PromptTemplate | |
from langchain.llms import OpenAI | |
from serpapi import GoogleSearch |