Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
dynamo
Commits
5a3c52ab
Unverified
Commit
5a3c52ab
authored
Feb 13, 2026
by
Yan Ru Pei
Committed by
GitHub
Feb 13, 2026
Browse files
chore: more mocker rusty cleanups (#6271)
Signed-off-by:
PeaBrane
<
yanrpei@gmail.com
>
parent
a582f4df
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
106 additions
and
175 deletions
+106
-175
lib/llm/src/mocker.rs
lib/llm/src/mocker.rs
+94
-175
lib/mocker/src/protocols.rs
lib/mocker/src/protocols.rs
+12
-0
No files found.
lib/llm/src/mocker.rs
View file @
5a3c52ab
This diff is collapsed.
Click to expand it.
lib/mocker/src/protocols.rs
View file @
5a3c52ab
...
@@ -161,6 +161,18 @@ impl MockEngineArgs {
...
@@ -161,6 +161,18 @@ impl MockEngineArgs {
MockEngineArgsBuilder
::
default
()
MockEngineArgsBuilder
::
default
()
}
}
pub
fn
is_prefill
(
&
self
)
->
bool
{
self
.worker_type
==
WorkerType
::
Prefill
}
pub
fn
is_decode
(
&
self
)
->
bool
{
self
.worker_type
==
WorkerType
::
Decode
}
pub
fn
needs_kv_publisher
(
&
self
)
->
bool
{
self
.enable_prefix_caching
&&
!
self
.is_decode
()
}
/// Create MockEngineArgs from a JSON file containing extra engine arguments
/// Create MockEngineArgs from a JSON file containing extra engine arguments
pub
fn
from_json_file
(
path
:
&
Path
)
->
anyhow
::
Result
<
Self
>
{
pub
fn
from_json_file
(
path
:
&
Path
)
->
anyhow
::
Result
<
Self
>
{
let
mut
builder
=
Self
::
builder
();
let
mut
builder
=
Self
::
builder
();
...
...
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