Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Semantic Router
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mirrored_repos
MachineLearning
aurelio-labs
Semantic Router
Commits
21dd2fdf
Unverified
Commit
21dd2fdf
authored
10 months ago
by
Siraj R Aizlewood
Browse files
Options
Downloads
Patches
Plain Diff
Linting.
parent
bfeeb1d9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/unit/llms/test_llm_base.py
+9
-3
9 additions, 3 deletions
tests/unit/llms/test_llm_base.py
with
9 additions
and
3 deletions
tests/unit/llms/test_llm_base.py
+
9
−
3
View file @
21dd2fdf
...
@@ -89,7 +89,9 @@ class TestBaseLLM:
...
@@ -89,7 +89,9 @@ class TestBaseLLM:
def
test_mandatory_args_only
(
self
,
base_llm
,
mixed_function_schema
):
def
test_mandatory_args_only
(
self
,
base_llm
,
mixed_function_schema
):
inputs
=
{
"
mandatory1
"
:
"
value1
"
,
"
mandatory2
"
:
42
}
inputs
=
{
"
mandatory1
"
:
"
value1
"
,
"
mandatory2
"
:
42
}
assert
base_llm
.
_is_valid_inputs
(
inputs
,
mixed_function_schema
)
# True is implied
assert
base_llm
.
_is_valid_inputs
(
inputs
,
mixed_function_schema
)
# True is implied
def
test_all_args_provided
(
self
,
base_llm
,
mixed_function_schema
):
def
test_all_args_provided
(
self
,
base_llm
,
mixed_function_schema
):
inputs
=
{
inputs
=
{
...
@@ -98,7 +100,9 @@ class TestBaseLLM:
...
@@ -98,7 +100,9 @@ class TestBaseLLM:
"
optional1
"
:
"
opt1
"
,
"
optional1
"
:
"
opt1
"
,
"
optional2
"
:
"
opt2
"
,
"
optional2
"
:
"
opt2
"
,
}
}
assert
base_llm
.
_is_valid_inputs
(
inputs
,
mixed_function_schema
)
# True is implied
assert
base_llm
.
_is_valid_inputs
(
inputs
,
mixed_function_schema
)
# True is implied
def
test_missing_mandatory_arg
(
self
,
base_llm
,
mixed_function_schema
):
def
test_missing_mandatory_arg
(
self
,
base_llm
,
mixed_function_schema
):
inputs
=
{
"
mandatory1
"
:
"
value1
"
,
"
optional1
"
:
"
opt1
"
,
"
optional2
"
:
"
opt2
"
}
inputs
=
{
"
mandatory1
"
:
"
value1
"
,
"
optional1
"
:
"
opt1
"
,
"
optional2
"
:
"
opt2
"
}
...
@@ -116,7 +120,9 @@ class TestBaseLLM:
...
@@ -116,7 +120,9 @@ class TestBaseLLM:
def
test_check_for_mandatory_inputs_all_present
(
self
,
base_llm
,
mandatory_params
):
def
test_check_for_mandatory_inputs_all_present
(
self
,
base_llm
,
mandatory_params
):
inputs
=
{
"
param1
"
:
"
value1
"
,
"
param2
"
:
"
value2
"
}
inputs
=
{
"
param1
"
:
"
value1
"
,
"
param2
"
:
"
value2
"
}
assert
base_llm
.
_check_for_mandatory_inputs
(
inputs
,
mandatory_params
)
# True is implied
assert
base_llm
.
_check_for_mandatory_inputs
(
inputs
,
mandatory_params
)
# True is implied
def
test_check_for_mandatory_inputs_missing_one
(
self
,
base_llm
,
mandatory_params
):
def
test_check_for_mandatory_inputs_missing_one
(
self
,
base_llm
,
mandatory_params
):
inputs
=
{
"
param1
"
:
"
value1
"
}
inputs
=
{
"
param1
"
:
"
value1
"
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment