Skip to content

Commit

Permalink
making cohere encoder optional (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
elisalimli authored Feb 15, 2024
1 parent 3f20dd8 commit 68074e1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion service/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ def create_route_layer() -> RouteLayer:
score_threshold=0.5,
)
]
encoder = CohereEncoder(cohere_api_key=config("COHERE_API_KEY"))
cohere_api_key = config("COHERE_API_KEY", None)
encoder = CohereEncoder(cohere_api_key=cohere_api_key) if cohere_api_key else None
return RouteLayer(encoder=encoder, routes=routes)


Expand Down

0 comments on commit 68074e1

Please sign in to comment.