Skip to content

Instantly share code, notes, and snippets.

View waseemhnyc's full-sized avatar
👋

WaseemH waseemhnyc

👋
View GitHub Profile
# set your OPENAI_API_KEY in your .env
from openai.types.chat import ChatCompletionMessageParam
from mirascope.openai import OpenAICall
from dotenv import load_dotenv
load_dotenv()
class Librarian(OpenAICall):
prompt_template = """
SYSTEM: You are the world's greatest librarian.
MESSAGES: {history}
from operator import itemgetter
from langchain.chat_models import ChatOpenAI
from langchain.embeddings import OpenAIEmbeddings
from langchain.schema import StrOutputParser
from langchain.schema.runnable import RunnablePassthrough, RunnableMap
from langchain.vectorstores import Chroma
from langchain.prompts import PromptTemplate
from langchain.document_loaders import JSONLoader
from dotenv import load_dotenv
@waseemhnyc
waseemhnyc / main.py
Last active May 24, 2023 16:52
Getting Started with ActiveloopAI Deep Lake
# Taken from https://docs.activeloop.ai/quickstart
# !pip3 install deeplake langchain openai tiktoken
from langchain.embeddings.openai import OpenAIEmbeddings
from langchain.text_splitter import CharacterTextSplitter
from langchain.document_loaders import TextLoader
from langchain.vectorstores import DeepLake
from langchain.chains import RetrievalQA
from langchain.llms import OpenAIChat
import os

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

$ git remote rm origin
$ git remote add origin git@github.com:aplikacjainfo/proj1.git
$ git config master.remote origin
$ git config master.merge refs/heads/master
@waseemhnyc
waseemhnyc / README.md
Created November 7, 2017 18:49 — forked from hofmannsven/README.md
My simply Git Cheatsheet