Skip to content

Commit

Permalink
Fix environment variable setting in embed_text component (#722)
Browse files Browse the repository at this point in the history
Set the environment key before calling the embedding model to avoid "no
api key found" error.
  • Loading branch information
Hakimovich99 authored Dec 12, 2023
1 parent 6780012 commit bc7bc98
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/embed_text/src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ def __init__(
auth_kwargs: dict,
**kwargs,
):
to_env_vars(api_keys)

self.embedding_model = self.get_embedding_model(
model_provider,
model,
auth_kwargs,
)

to_env_vars(api_keys)

@staticmethod
def get_embedding_model(
model_provider,
Expand Down

0 comments on commit bc7bc98

Please sign in to comment.