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
ceb67ceb
Unverified
Commit
ceb67ceb
authored
10 months ago
by
James Briggs
Browse files
Options
Downloads
Patches
Plain Diff
type fixes for linter
parent
78857b54
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
semantic_router/encoders/base.py
+2
-2
2 additions, 2 deletions
semantic_router/encoders/base.py
semantic_router/index/base.py
+1
-1
1 addition, 1 deletion
semantic_router/index/base.py
tests/unit/test_layer.py
+1
-1
1 addition, 1 deletion
tests/unit/test_layer.py
with
4 additions
and
4 deletions
semantic_router/encoders/base.py
+
2
−
2
View file @
ceb67ceb
from
typing
import
List
from
typing
import
Any
,
List
from
pydantic.v1
import
BaseModel
,
Field
from
pydantic.v1
import
BaseModel
,
Field
...
@@ -11,5 +11,5 @@ class BaseEncoder(BaseModel):
...
@@ -11,5 +11,5 @@ class BaseEncoder(BaseModel):
class
Config
:
class
Config
:
arbitrary_types_allowed
=
True
arbitrary_types_allowed
=
True
def
__call__
(
self
,
docs
:
List
[
str
])
->
List
[
List
[
float
]]:
def
__call__
(
self
,
docs
:
List
[
Any
])
->
List
[
List
[
float
]]:
raise
NotImplementedError
(
"
Subclasses must implement this method
"
)
raise
NotImplementedError
(
"
Subclasses must implement this method
"
)
This diff is collapsed.
Click to expand it.
semantic_router/index/base.py
+
1
−
1
View file @
ceb67ceb
...
@@ -20,7 +20,7 @@ class BaseIndex(BaseModel):
...
@@ -20,7 +20,7 @@ class BaseIndex(BaseModel):
type
:
str
=
"
base
"
type
:
str
=
"
base
"
def
add
(
def
add
(
self
,
embeddings
:
List
[
List
[
float
]],
routes
:
List
[
str
],
utterances
:
List
[
str
]
self
,
embeddings
:
List
[
List
[
float
]],
routes
:
List
[
str
],
utterances
:
List
[
Any
]
):
):
"""
"""
Add embeddings to the index.
Add embeddings to the index.
...
...
This diff is collapsed.
Click to expand it.
tests/unit/test_layer.py
+
1
−
1
View file @
ceb67ceb
...
@@ -289,7 +289,7 @@ class TestRouteLayer:
...
@@ -289,7 +289,7 @@ class TestRouteLayer:
route_layer
(
text
=
"
Hello
"
,
route_filter
=
[
"
Route 8
"
]).
name
route_layer
(
text
=
"
Hello
"
,
route_filter
=
[
"
Route 8
"
]).
name
except
ValueError
:
except
ValueError
:
assert
True
assert
True
# delete index
# delete index
pineconeindex
.
delete_index
()
pineconeindex
.
delete_index
()
...
...
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