Skip to content

Commit

Permalink
changed EmbeddingsGeneratorProvider env variables (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
doramasma authored Jul 26, 2023
1 parent 9777553 commit 52176e1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions apps/semantic_search/embeddings/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ class EmbeddingsGeneratorProvider:
def get_client(name: str) -> EmbeddingsGenerator:
if name == 'SPACES_TEXT':
return SpacesGradioTextEmbeddings(
endpoint_url=get_env_or_fail("EMBEDDINGS_GENERATION_URL"),
endpoint_key=get_env_or_fail("EMBEDDINGS_GENERATION_KEY"),
endpoint_url=get_env_or_fail("SPACES_URL"),
endpoint_key=get_env_or_fail("SPACES_KEY"),
batch_size=int(get_env_or_fail("BATCH_SIZE")),
)
if name == 'SPACES_INSTRUCT':
return SpacesGradioInstructTextEmbeddings(
endpoint_url=get_env_or_fail("EMBEDDINGS_GENERATION_URL"),
endpoint_key=get_env_or_fail("EMBEDDINGS_GENERATION_KEY"),
endpoint_url=get_env_or_fail("SPACES_URL"),
endpoint_key=get_env_or_fail("SPACES_KEY"),
batch_size=int(get_env_or_fail("BATCH_SIZE")),
)
if name == 'OPENAI':
Expand Down

0 comments on commit 52176e1

Please sign in to comment.