[Rust Frontend][gRPC] Add server and model discovery (#49491)
Signed-off-by: Connor Carpenter <connorc@nvidia.com> Co-authored-by: Nick Hill <nickhill123@gmail.com>
This commit is contained in:
co-authored by
Nick Hill
parent
2b465b2c42
commit
e3c2fc3b3c
@@ -255,6 +255,33 @@ impl ChatLlm {
|
||||
self.text.engine_core_client()
|
||||
}
|
||||
|
||||
/// Whether the loaded backend has a registered multimodal processor.
|
||||
pub fn supports_multimodal(&self) -> bool {
|
||||
self.processor.backend.multimodal_model_info().is_some()
|
||||
}
|
||||
|
||||
/// Effective tool-call parser name for this model, if parsing is enabled.
|
||||
pub fn tool_call_parser_name(&self) -> Option<&str> {
|
||||
match &self.tool_call_parser {
|
||||
ParserSelection::Auto => {
|
||||
ToolParserFactory::global().resolve_name_for_model(self.model_id())
|
||||
}
|
||||
ParserSelection::None => None,
|
||||
ParserSelection::Explicit(name) => Some(name),
|
||||
}
|
||||
}
|
||||
|
||||
/// Effective reasoning parser name for this model, if parsing is enabled.
|
||||
pub fn reasoning_parser_name(&self) -> Option<&str> {
|
||||
match &self.reasoning_parser {
|
||||
ParserSelection::Auto => {
|
||||
ReasoningParserFactory::global().resolve_name_for_model(self.model_id())
|
||||
}
|
||||
ParserSelection::None => None,
|
||||
ParserSelection::Explicit(name) => Some(name),
|
||||
}
|
||||
}
|
||||
|
||||
/// Render, tokenize, and submit one chat request.
|
||||
pub async fn chat(&self, request: ChatRequest) -> Result<ChatEventStream> {
|
||||
let (text_request, output_processor) = self
|
||||
|
||||
Reference in New Issue
Block a user