Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
change
sglang
Commits
cbc0e4d7
Unverified
Commit
cbc0e4d7
authored
Aug 26, 2025
by
Stefan He
Committed by
GitHub
Aug 26, 2025
Browse files
Fix lint for router (#9636)
parent
4cd08dc5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
sgl-router/tests/tool_parser_mistral.rs
sgl-router/tests/tool_parser_mistral.rs
+1
-1
sgl-router/tests/tool_parser_mixed_edge_cases.rs
sgl-router/tests/tool_parser_mixed_edge_cases.rs
+2
-2
sgl-router/tests/tool_parser_pythonic.rs
sgl-router/tests/tool_parser_pythonic.rs
+1
-1
No files found.
sgl-router/tests/tool_parser_mistral.rs
View file @
cbc0e4d7
...
@@ -59,7 +59,7 @@ async fn test_mistral_nested_json() {
...
@@ -59,7 +59,7 @@ async fn test_mistral_nested_json() {
async
fn
test_mistral_with_text_after
()
{
async
fn
test_mistral_with_text_after
()
{
let
parser
=
MistralParser
::
new
();
let
parser
=
MistralParser
::
new
();
let
input
=
r#"[TOOL_CALLS] [{"name": "test", "arguments": {}}]
let
input
=
r#"[TOOL_CALLS] [{"name": "test", "arguments": {}}]
And here's some text after the tool call that should be ignored."#
;
And here's some text after the tool call that should be ignored."#
;
let
result
=
parser
.parse_complete
(
input
)
.await
.unwrap
();
let
result
=
parser
.parse_complete
(
input
)
.await
.unwrap
();
...
...
sgl-router/tests/tool_parser_mixed_edge_cases.rs
View file @
cbc0e4d7
...
@@ -116,9 +116,9 @@ async fn test_empty_and_whitespace_variations() {
...
@@ -116,9 +116,9 @@ async fn test_empty_and_whitespace_variations() {
let
cases
=
vec!
[
let
cases
=
vec!
[
r#" {"name":"compact","arguments":{}} "#
,
r#" {"name":"compact","arguments":{}} "#
,
r#"
r#"
{"name": "spaced", "arguments": {}}
{"name": "spaced", "arguments": {}}
"#
,
"#
,
r#" {"name": "tabbed", "arguments": {}} "#
,
// tabs
r#" {"name": "tabbed", "arguments": {}} "#
,
// tabs
];
];
...
...
sgl-router/tests/tool_parser_pythonic.rs
View file @
cbc0e4d7
...
@@ -159,7 +159,7 @@ async fn test_pythonic_real_world_llama4() {
...
@@ -159,7 +159,7 @@ async fn test_pythonic_real_world_llama4() {
// Actual output from Llama 4 model
// Actual output from Llama 4 model
let
input
=
r#"I'll help you with multiple tasks. Let me search for information and perform calculations.
let
input
=
r#"I'll help you with multiple tasks. Let me search for information and perform calculations.
[web_search(query="latest Rust features", max_results=3, safe_search=True),
[web_search(query="latest Rust features", max_results=3, safe_search=True),
calculate(expression="42 * 3.14159", precision=2),
calculate(expression="42 * 3.14159", precision=2),
get_weather(city="San Francisco", units="fahrenheit", include_forecast=False)]
get_weather(city="San Francisco", units="fahrenheit", include_forecast=False)]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment