Skip to content

Commit

Permalink
temporary
Browse files Browse the repository at this point in the history
  • Loading branch information
amadolid committed Mar 22, 2024
1 parent a93a37f commit 8fc0cbd
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

OAI_CLIENT = None
ES_CLIENT = None
MAX_DIMENSIONS = int(getenv("ELASTICSEARCH_VECTOR_SIZE", "2048"))
MAX_DIMENSIONS = getenv("ELASTICSEARCH_VECTOR_SIZE", "2048")
CONFIG = {
"elastic": {
"url": getenv("ELASTICSEARCH_URL", "http://localhost:9200"),
Expand All @@ -34,7 +34,7 @@
"id": {"type": "keyword"},
"embedding": {
"type": "dense_vector",
"dims": MAX_DIMENSIONS,
"dims": int(MAX_DIMENSIONS),
"index": True,
"similarity": getenv("ELASTICSEARCH_SIMILARITY", "cosine"),
},
Expand All @@ -47,7 +47,9 @@
"openai": {"api_key": getenv("OPENAI_API_KEY")},
"openai_embedding": {
"model": getenv("OPENAI_EMBEDDING_MODEL", "text-embedding-3-large"),
"dimensions": getenv("OPENAI_EMBEDDING_DIMENSIONS", MAX_DIMENSIONS),
"extra_body": {
"dimensions": int(getenv("OPENAI_EMBEDDING_DIMENSIONS", MAX_DIMENSIONS))
},
},
"chunk_config": {
"chunk_size": int(getenv("CHUNK_SIZE", "200")),
Expand Down

0 comments on commit 8fc0cbd

Please sign in to comment.