Skip to content

Commit 03ec8b5

Browse files
committed
test: align conformance prompt args with runner
1 parent a16f5f8 commit 03ec8b5

1 file changed

Lines changed: 7 additions & 10 deletions

File tree

conformance/src/bin/server.rs

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -656,11 +656,11 @@ impl ServerHandler for ConformanceServer {
656656
"test_prompt_with_arguments",
657657
Some("A test prompt that accepts arguments"),
658658
Some(vec![
659-
PromptArgument::new("name")
660-
.with_description("The name to greet")
659+
PromptArgument::new("arg1")
660+
.with_description("First test argument")
661661
.with_required(true),
662-
PromptArgument::new("style")
663-
.with_description("The greeting style")
662+
PromptArgument::new("arg2")
663+
.with_description("Second test argument")
664664
.with_required(false),
665665
]),
666666
),
@@ -692,14 +692,11 @@ impl ServerHandler for ConformanceServer {
692692
.with_description("A simple test prompt")),
693693
"test_prompt_with_arguments" => {
694694
let args = request.arguments.unwrap_or_default();
695-
let name = args.get("name").and_then(|v| v.as_str()).unwrap_or("World");
696-
let style = args
697-
.get("style")
698-
.and_then(|v| v.as_str())
699-
.unwrap_or("friendly");
695+
let arg1 = args.get("arg1").and_then(|v| v.as_str()).unwrap_or("");
696+
let arg2 = args.get("arg2").and_then(|v| v.as_str()).unwrap_or("");
700697
Ok(GetPromptResult::new(vec![PromptMessage::new_text(
701698
Role::User,
702-
format!("Please greet {} in a {} style.", name, style),
699+
format!("Prompt with arguments: arg1='{}', arg2='{}'", arg1, arg2),
703700
)])
704701
.with_description("A prompt with arguments"))
705702
}

0 commit comments

Comments
 (0)