This file contains 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
from langchain.llms import OpenAI | |
import os | |
from langchain import LLMChain, PromptTemplate | |
import sys | |
import platform | |
import distro | |
from langchain.memory import ConversationBufferMemory | |
def get_llm(): | |
os.environ["OPENAI_API_KEY"] = "sk-abc" |
This file contains 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
### Function extract for common file formats ### | |
SAVEIFS=$IFS | |
IFS=$(echo -en "\n\b") | |
function extract { | |
if [ -z "$1" ]; then | |
# display usage if no parameters given | |
echo "Usage: extract <path/file_name>.<zip|rar|bz2|gz|tar|tbz2|tgz|Z|7z|xz|ex|tar.bz2|tar.gz|tar.xz>" | |
echo " extract <path/file_name_1.ext> [path/file_name_2.ext] [path/file_name_3.ext]" | |
else |