Skip to content

Commit

Permalink
Refactor cohere api key
Browse files Browse the repository at this point in the history
  • Loading branch information
John Cordeiro committed Apr 7, 2024
1 parent 113e807 commit 3cb128a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def __init__(self):
"model": os.environ.get(
"COHERE_MODEL", "embed-multilingual-v3.0"
),
"cohere_api_token": os.environ.get(
"cohere_api_key": os.environ.get(
"COHERE_API_KEY", "f9BfpzFleAcsa4HueXrCSWyMxJEOuMcpbesB2Rxo"
),
}
Expand Down
2 changes: 1 addition & 1 deletion app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def __init__(self, config: AppConfig):
elif config.embedding_type == "cohere":
self.embeddings = CohereEmbeddings(
model=config.cohere["model"],
cohere_api_key=config.cohere["cohere_api_token"]
cohere_api_key=config.cohere["cohere_api_key"]
)
else: # sagemaker by default
content_handler = ContentHandler()
Expand Down

0 comments on commit 3cb128a

Please sign in to comment.