Add support for binary resource in conformance server example (#216)
This commit is contained in:
parent
2f29b1dbe5
commit
96ab01712b
2 changed files with 2 additions and 2 deletions
2
.github/workflows/pipeline.yaml
vendored
2
.github/workflows/pipeline.yaml
vendored
|
|
@ -105,7 +105,7 @@ jobs:
|
|||
passedTests=$(echo "$OUTPUT" | sed -nE 's/.*Total: ([0-9]+) passed.*/\1/p')
|
||||
passedTests=${passedTests:-0}
|
||||
|
||||
REQUIRED_TESTS_TO_PASS=20
|
||||
REQUIRED_TESTS_TO_PASS=21
|
||||
echo "Required tests to pass: $REQUIRED_TESTS_TO_PASS"
|
||||
[ "$passedTests" -ge "$REQUIRED_TESTS_TO_PASS" ] || exit $exit_code
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ $server = Server::builder()
|
|||
// ->addTool([Elements::class, 'toolWithSampling'], 'test_sampling', 'Tests server-initiated sampling (LLM completion request)')
|
||||
// Resources
|
||||
->addResource(fn () => 'This is the content of the static text resource.', 'test://static-text', 'static-text', 'A static text resource for testing')
|
||||
->addResource(fn () => ''/* TODO: Missing Support for Binary? */, 'test://static-binary', 'static-binary', 'A static binary resource (image) for testing')
|
||||
->addResource(fn () => fopen('data://image/png;base64,'.Elements::TEST_IMAGE_BASE64, 'r'), 'test://static-binary', 'static-binary', 'A static binary resource (image) for testing')
|
||||
->addResourceTemplate([Elements::class, 'resourceTemplate'], 'test://template/{id}/data', 'template', 'A resource template with parameter substitution', 'application/json')
|
||||
// TODO: Handler for resources/subscribe and resources/unsubscribe
|
||||
->addResource(fn () => 'Watched resource content', 'test://watched-resource', 'watched-resource', 'A resource that auto-updates every 3 seconds')
|
||||
|
|
|
|||
Loading…
Reference in a new issue