Skip to content

Commit

Permalink
patch: get env vars locally (langchain-ai#265)
Browse files Browse the repository at this point in the history
  • Loading branch information
baskaryan authored Feb 8, 2024
1 parent 3a001ae commit 2284e78
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ingest.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)

WEAVIATE_URL = os.environ["WEAVIATE_URL"]
WEAVIATE_API_KEY = os.environ["WEAVIATE_API_KEY"]
RECORD_MANAGER_DB_URL = os.environ["RECORD_MANAGER_DB_URL"]


def get_embeddings_model() -> Embeddings:
if os.environ.get("VOYAGE_API_KEY") and os.environ.get("VOYAGE_AI_MODEL"):
Expand Down Expand Up @@ -103,6 +99,10 @@ def load_api_docs():


def ingest_docs():
WEAVIATE_URL = os.environ["WEAVIATE_URL"]
WEAVIATE_API_KEY = os.environ["WEAVIATE_API_KEY"]
RECORD_MANAGER_DB_URL = os.environ["RECORD_MANAGER_DB_URL"]

text_splitter = RecursiveCharacterTextSplitter(chunk_size=4000, chunk_overlap=200)
client = weaviate.Client(
url=WEAVIATE_URL,
Expand Down

0 comments on commit 2284e78

Please sign in to comment.