Compare commits
2 Commits
11db2bc697
...
e63bf2d8c7
| Author | SHA1 | Date | |
|---|---|---|---|
| e63bf2d8c7 | |||
| c7caf06db5 |
@@ -64,7 +64,7 @@ COHERE_API_KEY=your_cohere_api_key
|
||||
VECTOR_DB=pinecone
|
||||
PINECONE_API_KEY=your_pinecone_api_key
|
||||
PINECONE_ENVIRONMENT=your_pinecone_environment #us-east-1
|
||||
PINECONE_INDEX_NAME=specscomply_documents
|
||||
PINECONE_INDEX_NAME=specscomply-documents
|
||||
|
||||
# Or for Weaviate:
|
||||
# VECTOR_DB=weaviate
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import cohere
|
||||
from typing import List, Dict, Any, Optional
|
||||
import uuid
|
||||
from pinecone import Pinecone
|
||||
from pinecone import Pinecone, ServerlessSpec
|
||||
import weaviate
|
||||
from loguru import logger
|
||||
|
||||
@@ -31,7 +31,11 @@ class EmbeddingService:
|
||||
pc.create_index(
|
||||
name=settings.PINECONE_INDEX_NAME,
|
||||
dimension=1024, # Cohere embed-english-v3.0 dimension
|
||||
metric="cosine"
|
||||
metric="cosine",
|
||||
spec=ServerlessSpec(
|
||||
cloud='aws',
|
||||
region='us-east-1'
|
||||
)
|
||||
)
|
||||
|
||||
# Return the index
|
||||
|
||||
Reference in New Issue
Block a user