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
| {"nodes":[{"width":300,"height":526,"id":"chatOpenAI_0","position":{"x":429.55643898332966,"y":-202.71994150214903},"type":"customNode","data":{"id":"chatOpenAI_0","label":"ChatOpenAI","name":"chatOpenAI","type":"ChatOpenAI","baseClasses":["ChatOpenAI","BaseChatModel","BaseLanguageModel","BaseLangChain","Serializable"],"category":"Chat Models","description":"Wrapper around OpenAI large language models that use the Chat endpoint","inputParams":[{"label":"OpenAI Api Key","name":"openAIApiKey","type":"password","id":"chatOpenAI_0-input-openAIApiKey-password"},{"label":"Model Name","name":"modelName","type":"options","options":[{"label":"gpt-4","name":"gpt-4"},{"label":"gpt-4-0314","name":"gpt-4-0314"},{"label":"gpt-4-32k-0314","name":"gpt-4-32k-0314"},{"label":"gpt-4-0613","name":"gpt-4-0613"},{"label":"gpt-3.5-turbo","name":"gpt-3.5-turbo"},{"label":"gpt-3.5-turbo-0301","name":"gpt-3.5-turbo-0301"},{"label":"gpt-3.5-turbo-0613","name":"gpt-3.5-turbo-0613"}],"default":"gpt-3.5-turbo","optional":true,"id":"chatOp |
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
| import json | |
| import openai | |
| import pymysql | |
| from colorama import Fore | |
| from tabulate import tabulate | |
| def dictfetchall(cursor, fet_rows): | |
| """Returns all rows from a cursor as a list of dicts""" |
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
| import openai | |
| from colorama import Fore | |
| from langchain import PromptTemplate | |
| from langchain.chains import ConversationalRetrievalChain, RetrievalQA | |
| from langchain.chat_models import ChatOpenAI | |
| from langchain.document_loaders import TextLoader | |
| from langchain.embeddings import HuggingFaceEmbeddings | |
| from langchain.memory import ConversationBufferMemory | |
| from langchain.schema import SystemMessage | |
| from langchain.text_splitter import RecursiveCharacterTextSplitter |
OlderNewer