From 3cb128a571db331638b28ec458e0400f580a1b51 Mon Sep 17 00:00:00 2001 From: John Cordeiro Date: Sun, 7 Apr 2024 14:31:22 -0300 Subject: [PATCH] Refactor cohere api key --- app/config.py | 2 +- app/main.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/config.py b/app/config.py index f448576..dac8df8 100644 --- a/app/config.py +++ b/app/config.py @@ -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" ), } diff --git a/app/main.py b/app/main.py index 2cf062a..842963b 100644 --- a/app/main.py +++ b/app/main.py @@ -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()