mirror of
https://github.com/wassname/stampy-chat.git
synced 2026-09-12 13:00:42 +08:00
Moving Pinecone env variables assignments to settings
This commit is contained in:
@@ -4,7 +4,7 @@ import os
|
||||
import json
|
||||
import pinecone
|
||||
|
||||
from .settings import PINECONE_INDEX_NAME, PINECONE_VALUES_DIMS, PINECONE_METRIC, PINECONE_METADATA_ENTRIES
|
||||
from .settings import PINECONE_INDEX_NAME, PINECONE_VALUES_DIMS, PINECONE_METRIC, PINECONE_METADATA_ENTRIES, PINECONE_API_KEY, PINECONE_ENVIRONMENT
|
||||
|
||||
import logging
|
||||
logger = logging.getLogger(__name__)
|
||||
@@ -17,9 +17,6 @@ class PineconeDB:
|
||||
):
|
||||
self.index_name = PINECONE_INDEX_NAME
|
||||
|
||||
PINECONE_API_KEY = os.environ["PINECONE_API_KEY"]
|
||||
PINECONE_ENVIRONMENT = os.environ["PINECONE_ENVIRONMENT"]
|
||||
|
||||
pinecone.init(
|
||||
api_key = PINECONE_API_KEY,
|
||||
environment = PINECONE_ENVIRONMENT,
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
# dataset/settings.py
|
||||
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
### FILE PATHS ###
|
||||
@@ -19,6 +20,8 @@ PINECONE_INDEX_NAME = "stampy-chat-embeddings-test"
|
||||
PINECONE_VALUES_DIMS = EMBEDDINGS_DIMS
|
||||
PINECONE_METRIC = "cosine"
|
||||
PINECONE_METADATA_ENTRIES = ["entry_id", "source", "title", "authors", "text"]
|
||||
PINECONE_API_KEY = os.environ["PINECONE_API_KEY"]
|
||||
PINECONE_ENVIRONMENT = os.environ["PINECONE_ENVIRONMENT"]
|
||||
|
||||
### MISCELLANEOUS ###
|
||||
MAX_NUM_AUTHORS_IN_SIGNATURE = 3
|
||||
Reference in New Issue
Block a user