Skip to content

Commit

Permalink
changed EmbeddingsGeneratorProvider env variables
Browse files Browse the repository at this point in the history
  • Loading branch information
doramasma committed Jul 25, 2023
1 parent 91a3b7f commit effcd3e
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 effcd3e

Please sign in to comment.