File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
nemoguardrails/library/autoalign Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -721,7 +721,7 @@ define flow
721
721
# ## AutoAlign
722
722
723
723
NeMo Guardrails provides an interface for using the AutoAlign's guardrails
724
- (you need to have the `AUTOGUARD_API_KEY ` environment variable set).
724
+ (you need to have the `AUTOALIGN_API_KEY ` environment variable set).
725
725
726
726
727
727
Following is the list of guardrails that are currently supported :
Original file line number Diff line number Diff line change @@ -132,9 +132,9 @@ async def autoalign_infer(
132
132
show_toxic_phrases : bool = False ,
133
133
):
134
134
"""Checks whether the given text passes through the applied guardrails."""
135
- api_key = os .environ .get ("AUTOGUARD_API_KEY " )
135
+ api_key = os .environ .get ("AUTOALIGN_API_KEY " )
136
136
if api_key is None :
137
- raise ValueError ("AUTOGUARD_API_KEY environment variable not set." )
137
+ raise ValueError ("AUTOALIGN_API_KEY environment variable not set." )
138
138
139
139
headers = {"x-api-key" : api_key }
140
140
config = DEFAULT_CONFIG .copy ()
@@ -176,9 +176,9 @@ async def autoalign_factcheck_infer(
176
176
documents : List [str ],
177
177
):
178
178
"""Checks the facts for the text using the given documents and provides a fact-checking score"""
179
- api_key = os .environ .get ("AUTOGUARD_API_KEY " )
179
+ api_key = os .environ .get ("AUTOALIGN_API_KEY " )
180
180
if api_key is None :
181
- raise ValueError ("AUTOGUARD_API_KEY environment variable not set." )
181
+ raise ValueError ("AUTOALIGN_API_KEY environment variable not set." )
182
182
headers = {"x-api-key" : api_key }
183
183
request_body = {
184
184
"prompt" : text ,
You can’t perform that action at this time.
0 commit comments