Skip to content

Commit e2137b9

Browse files
committed
Revert changes to test_bug_5 and test_passthroug_mode now API Key field is optional
1 parent 5af9758 commit e2137b9

File tree

2 files changed

+2
-13
lines changed

2 files changed

+2
-13
lines changed

tests/test_bug_5.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,11 @@
1212
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
15-
import os
16-
1715
import pytest
1816

1917
from nemoguardrails import RailsConfig
2018
from tests.utils import TestChat
2119

22-
OPENAI_KEY_ENV_VAR = "NG_OPENAI_API_KEY"
23-
os.environ[OPENAI_KEY_ENV_VAR] = "sk-svcacct-abcdef12345"
24-
2520
config = RailsConfig.from_content(
2621
"""
2722
define user express greeting
@@ -36,12 +31,11 @@
3631
user express greeting
3732
bot express greeting
3833
""",
39-
yaml_content=f"""
34+
yaml_content="""
4035
models:
4136
- type: main
4237
engine: openai
4338
model: gpt-3.5-instruct-turbo
44-
api_key_env_var: {OPENAI_KEY_ENV_VAR}
4539
""",
4640
)
4741

tests/v2_x/test_passthroug_mode.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,11 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
import logging
16-
import os
1716
import unittest
1817

1918
from nemoguardrails import RailsConfig
2019
from tests.utils import TestChat
2120

22-
OPENAI_KEY_ENV_VAR = "NG_OPENAI_API_KEY"
23-
os.environ[OPENAI_KEY_ENV_VAR] = "sk-svcacct-abcdef12345"
24-
2521
colang_content = '''
2622
import core
2723
import passthrough
@@ -48,13 +44,12 @@
4844
user said "This is boring"
4945
'''
5046

51-
yaml_content = f"""
47+
yaml_content = """
5248
colang_version: "2.x"
5349
models:
5450
- type: main
5551
engine: openai
5652
model: gpt-3.5-turbo-instruct
57-
api_key_env_var: {OPENAI_KEY_ENV_VAR}
5853
"""
5954

6055

0 commit comments

Comments
 (0)