Skip to content

Commit

Permalink
fix: func schema string logic
Browse files Browse the repository at this point in the history
  • Loading branch information
jamescalam committed Dec 1, 2024
1 parent 47bce51 commit 5c3f808
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions semantic_router/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ def to_str(self, include_metadata: bool = False):
json.dumps(schema, sort_keys=True)
for schema in self.function_schemas
]
else:
function_schemas_sorted = []
# we must do the same for metadata
metadata_sorted = json.dumps(self.metadata, sort_keys=True)
return f"{self.route}: {self.utterance} | {function_schemas_sorted} | {metadata_sorted}"
Expand Down

0 comments on commit 5c3f808

Please sign in to comment.