Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
$ git remote rm origin | |
$ git remote add origin [email protected]:aplikacjainfo/proj1.git | |
$ git config master.remote origin | |
$ git config master.merge refs/heads/master |
# 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 |
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 |
# 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} |
# Problem 1: Smart Home Device Hierarchy | |
""" | |
Instructions: | |
1. Create a base class called 'SmartDevice' with attributes for device name, connection status, and power status | |
2. Implement methods to turn on/off the device and connect/disconnect from WiFi | |
3. Create a child class 'SmartThermostat' that inherits from SmartDevice | |
4. Add temperature-related attributes and methods to the SmartThermostat class | |
5. Test your implementation with the provided test cases |