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
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 |
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
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 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 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
Sales Executive Documentation for TechSamurai:- | |
Products by TechSamurai: | |
1. FLIXSamurai | |
2. HouseTalk | |
3. SweetSangeet | |
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 colorama import Fore | |
from langchain import SQLDatabase, LLMMathChain | |
from langchain.agents import initialize_agent, AgentType, create_sql_agent, AgentExecutor | |
from langchain.agents.agent_toolkits import SQLDatabaseToolkit | |
from langchain.chains import ConversationChain | |
from langchain.chat_models import ChatOpenAI | |
from langchain.memory import ConversationBufferMemory, ReadOnlySharedMemory | |
from langchain.prompts import ChatPromptTemplate, SystemMessagePromptTemplate, MessagesPlaceholder, \ | |
HumanMessagePromptTemplate |
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 colorama import Fore | |
from langchain.chains import ConversationalRetrievalChain | |
from langchain.chat_models import ChatOpenAI | |
from langchain.document_loaders import TextLoader | |
from langchain.embeddings import HuggingFaceInstructEmbeddings | |
from langchain.memory import ConversationBufferMemory | |
from langchain.text_splitter import RecursiveCharacterTextSplitter | |
from langchain.vectorstores import Chroma | |
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
import json | |
from colorama import Fore | |
from langchain.chains import ConversationalRetrievalChain | |
from langchain.chains.conversational_retrieval.base import BaseConversationalRetrievalChain | |
from langchain.chat_models import ChatOpenAI | |
from langchain.document_loaders import TextLoader | |
from langchain.embeddings import HuggingFaceInstructEmbeddings | |
from langchain.prompts import PromptTemplate | |
from langchain.text_splitter import RecursiveCharacterTextSplitter |
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
const readline = require('readline'); | |
const fs = require('fs'); | |
const rl = readline.createInterface({ | |
input: process.stdin, | |
output: process.stdout | |
}); | |
const filename = "chat_export.txt"; | |
let datetime_str = ""; |
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
import json | |
import requests | |
from types import SimpleNamespace | |
movieSchema = { | |
"id": "<unique id of the web series", | |
"plot": "<plot of the Web Series>", | |
"maturity": "<Random Int value from (13+,16+,18+)>", | |
"release": "<Date when the Series released. in YYYY-MM-DD format>", | |
"seasons": 1, |
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
package com.example.bmiapp | |
class BMIcalculator { | |
fun calculateBMI(heightCMS: Float, weightKGS: Float ): String { | |
val heightMtr = heightCMS / 100.0 | |
val bmiScore = weightKGS / (heightMtr * heightMtr) | |
return getBMIStatus(bmiScore) |
NewerOlder