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 os,json,time | |
import openai | |
from cookie_loader import save_cookies_as_Netscape | |
import webvtt | |
from yt_dlp import YoutubeDL | |
PROXY='http://127.0.0.1:7890' | |
def get_llm_config(scheme='openai'): |
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
from langchain_openai import ChatOpenAI | |
from langchain_core.prompts import ChatPromptTemplate | |
from langchain_core.pydantic_v1 import BaseModel, Field | |
import json,urllib.request,websockets,asyncio | |
from typing import TypedDict, List | |
import textwrap,html | |
from bs4 import BeautifulSoup, Tag, NavigableString,Comment | |
import os | |
from dotenv import load_dotenv,find_dotenv | |
load_dotenv(find_dotenv()) |
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 { NextRequest } from 'next/server'; | |
import { Message as VercelChatMessage, StreamingTextResponse } from 'ai'; | |
import { AIMessage, ChatMessage, HumanMessage } from "@langchain/core/messages"; | |
import { ChatOpenAI } from '@langchain/openai'; | |
import { | |
ChatPromptTemplate, | |
} from "@langchain/core/prompts"; | |
import { BaseCallbackHandler } from "@langchain/core/callbacks/base"; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 os | |
import feedparser,markdown | |
import pandas as pd | |
import time | |
from datetime import datetime,timedelta | |
from dotenv import load_dotenv | |
from revChatGPT.V1 import Chatbot as ChatGPT | |
PROXY='http://127.0.0.1:7890' |