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
8ac3ccc0
Unverified
Commit
8ac3ccc0
authored
Oct 05, 2024
by
Byron Hsu
Committed by
GitHub
Oct 05, 2024
Browse files
Backend method not found when SRT Runtime is used (#1576)
parent
9b0926ce
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
python/sglang/api.py
python/sglang/api.py
+8
-0
No files found.
python/sglang/api.py
View file @
8ac3ccc0
...
...
@@ -48,6 +48,10 @@ def flush_cache(backend: Optional[BaseBackend] = None):
backend
=
backend
or
global_config
.
default_backend
if
backend
is
None
:
return
False
# If backend is Runtime
if
hasattr
(
backend
,
"endpoint"
):
backend
=
backend
.
endpoint
return
backend
.
flush_cache
()
...
...
@@ -55,6 +59,10 @@ def get_server_args(backend: Optional[BaseBackend] = None):
backend
=
backend
or
global_config
.
default_backend
if
backend
is
None
:
return
None
# If backend is Runtime
if
hasattr
(
backend
,
"endpoint"
):
backend
=
backend
.
endpoint
return
backend
.
get_server_args
()
...
...
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