Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
C
coderai
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexlab
coderai
Commits
8fe20489
Commit
8fe20489
authored
May 06, 2026
by
Stefy Lanza (nextime / spora )
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: finalize multimodal test client flow
parent
9876a8fe
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
61 additions
and
0 deletions
+61
-0
test_manual_multimodal_test_client.py
tests/test_manual_multimodal_test_client.py
+34
-0
manual_multimodal_test_client.py
tools/manual_multimodal_test_client.py
+27
-0
No files found.
tests/test_manual_multimodal_test_client.py
View file @
8fe20489
...
...
@@ -549,3 +549,37 @@ def test_task5_execute_request_filters_method_and_url_from_forwarded_kwargs(monk
assert
captured
[
"kwargs"
]
==
{
"params"
:
{
"verbose"
:
"1"
}}
assert
"method"
not
in
captured
[
"kwargs"
]
assert
"url"
not
in
captured
[
"kwargs"
]
def
test_main_runs_selected_mode_and_prints_text
(
monkeypatch
,
capsys
,
tmp_path
):
monkeypatch
.
setattr
(
"tools.manual_multimodal_test_client.choose_mode_interactively"
,
lambda
:
"llm"
)
monkeypatch
.
setattr
(
"tools.manual_multimodal_test_client.execute_mode"
,
lambda
args
,
selected_mode
:
{
"text"
:
"done"
,
"artifact_path"
:
None
},
)
from
tools.manual_multimodal_test_client
import
main
exit_code
=
main
([
"--output-dir"
,
str
(
tmp_path
)])
captured
=
capsys
.
readouterr
()
assert
exit_code
==
0
assert
"done"
in
captured
.
out
def
test_main_prints_artifact_path_when_present
(
monkeypatch
,
capsys
,
tmp_path
):
artifact
=
tmp_path
/
"out.wav"
artifact
.
write_bytes
(
b
"bytes"
)
monkeypatch
.
setattr
(
"tools.manual_multimodal_test_client.execute_mode"
,
lambda
args
,
selected_mode
:
{
"text"
:
"summary"
,
"artifact_path"
:
artifact
},
)
from
tools.manual_multimodal_test_client
import
main
exit_code
=
main
([
"audio-generation"
,
"--output-dir"
,
str
(
tmp_path
)])
captured
=
capsys
.
readouterr
()
assert
exit_code
==
0
assert
"summary"
in
captured
.
out
assert
str
(
artifact
)
in
captured
.
out
tools/manual_multimodal_test_client.py
View file @
8fe20489
...
...
@@ -275,3 +275,30 @@ def execute_request(spec: dict):
finally
:
if
cleanup
is
not
None
:
cleanup
()
def
execute_mode
(
args
:
argparse
.
Namespace
,
selected_mode
:
str
)
->
dict
:
config
=
resolve_mode_config
(
args
,
selected_mode
)
spec
=
build_request_spec
(
config
)
response
=
execute_request
(
spec
)
return
handle_response_payload
(
selected_mode
,
response
,
config
[
"output_dir"
])
def
main
(
argv
:
list
[
str
]
|
None
=
None
)
->
int
:
args
=
parse_args
(
argv
)
selected_mode
=
args
.
mode
or
choose_mode_interactively
()
try
:
result
=
execute_mode
(
args
,
selected_mode
)
except
Exception
as
exc
:
print
(
f
"ERROR [{selected_mode}]: {exc}"
)
return
1
if
result
.
get
(
"text"
):
print
(
result
[
"text"
])
if
result
.
get
(
"artifact_path"
)
is
not
None
:
print
(
result
[
"artifact_path"
])
return
0
if
__name__
==
"__main__"
:
raise
SystemExit
(
main
())
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