Skip to content

Instantly share code, notes, and snippets.

View hlwhl's full-sized avatar
🧸
babysitting

Prome hlwhl

🧸
babysitting
View GitHub Profile
import logging
from flask import Flask, request
from flask_cors import CORS
from llama_index import Document, GPTSimpleVectorIndex, LLMPredictor, QuestionAnswerPrompt, ServiceContext, PromptHelper
from langchain.chat_models import ChatOpenAI
app = Flask(__name__)
CORS(app)
@hlwhl
hlwhl / talkingRepo.py
Created March 26, 2023 08:18
talk to github repo using llama_index
from llama_index.readers.llamahub_modules.github_repo import GithubClient, GithubRepositoryReader
from llama_index import download_loader
import pickle
import os
from llama_index import GPTSimpleVectorIndex, LLMPredictor
from langchain.chat_models import ChatOpenAI
from langchain import OpenAI
download_loader("GithubRepositoryReader")