Implement SEP-1577: Sampling With Tools (#628)
* feat: implement SEP-1577 sampling with tools support * feat: add TryFrom<Content> for backward-compatible migration
This commit is contained in:
parent
be23334f9d
commit
8bd3fcb890
1 changed files with 1850 additions and 141 deletions
|
|
@ -41,10 +41,7 @@ impl ClientHandler for SamplingDemoClient {
|
|||
self.mock_llm_response(¶ms.messages, params.system_prompt.as_deref());
|
||||
|
||||
Ok(CreateMessageResult {
|
||||
message: SamplingMessage {
|
||||
role: Role::Assistant,
|
||||
content: Content::text(response_text),
|
||||
},
|
||||
message: SamplingMessage::assistant_text(response_text),
|
||||
model: "mock_llm".to_string(),
|
||||
stop_reason: Some(CreateMessageResult::STOP_REASON_END_TURN.to_string()),
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue