Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
mscolnick committed Aug 29, 2024
1 parent 7a79172 commit a0e1525
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/_server/api/endpoints/test_ai.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,9 @@ def test_completion_with_custom_base_url(
def openai_config(config: UserConfigManager):
prev_config = config.get_config()
try:
config.save_config({"ai": {"open_ai": {"api_key": "fake-api"}}})
config.save_config(
{"ai": {"open_ai": {"api_key": "fake-api", "model": ""}}}
)
yield
finally:
config.save_config(prev_config)
Expand Down Expand Up @@ -328,6 +330,7 @@ def openai_config_custom_base_url(config: UserConfigManager):
"open_ai": {
"api_key": "fake-api",
"base_url": "https://my-openai-instance.com",
"model": "",
}
}
}
Expand All @@ -341,7 +344,7 @@ def openai_config_custom_base_url(config: UserConfigManager):
def no_openai_config(config: UserConfigManager):
prev_config = config.get_config()
try:
config.save_config({"ai": {"open_ai": {"api_key": ""}}})
config.save_config({"ai": {"open_ai": {"api_key": "", "model": ""}}})
yield
finally:
config.save_config(prev_config)
Expand Down

0 comments on commit a0e1525

Please sign in to comment.