-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
068b199
commit 427e723
Showing
12 changed files
with
59 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,29 @@ | ||
from .models import get_model, get_model_group, get_models_by_organization, get_all_code_models, Model | ||
# TODO(PR): Remove this and create appropriate tests | ||
|
||
# from .models import get_model, get_model_group, get_models_by_organization, get_all_code_models, Model | ||
|
||
def test_get_model(): | ||
model: Model = get_model("ai21/j1-jumbo") | ||
assert model.organization == "ai21" | ||
assert model.engine == "j1-jumbo" | ||
|
||
# def test_get_model(): | ||
# model: Model = get_model("ai21/j1-jumbo") | ||
# assert model.organization == "ai21" | ||
# assert model.engine == "j1-jumbo" | ||
|
||
def test_get_model_with_invalid_model_name(): | ||
try: | ||
get_model("invalid/model") | ||
assert False, "Expected to throw ValueError" | ||
except ValueError: | ||
pass | ||
|
||
# def test_get_model_with_invalid_model_name(): | ||
# try: | ||
# get_model("invalid/model") | ||
# assert False, "Expected to throw ValueError" | ||
# except ValueError: | ||
# pass | ||
|
||
def test_get_model_group(): | ||
assert get_model_group("openai/text-curie-001") == "gpt3" | ||
|
||
# def test_get_model_group(): | ||
# assert get_model_group("openai/text-curie-001") == "gpt3" | ||
|
||
def test_get_models_by_organization(): | ||
assert get_models_by_organization("simple") == ["simple/model1"] | ||
|
||
# def test_get_models_by_organization(): | ||
# assert get_models_by_organization("simple") == ["simple/model1"] | ||
|
||
def test_all_code_models(): | ||
assert "openai/code-davinci-002" in get_all_code_models() | ||
|
||
# def test_all_code_models(): | ||
# assert "openai/code-davinci-002" in get_all_code_models() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters