made parsing public
This commit is contained in:
@@ -151,7 +151,7 @@ impl AgentChat {
|
|||||||
/// let result = AgentChat::parse_tool_name("example:get_foo".to_string());
|
/// let result = AgentChat::parse_tool_name("example:get_foo".to_string());
|
||||||
/// assert_eq!(result.unwrap(), ("example".to_string(), "get_foo".to_string()))
|
/// assert_eq!(result.unwrap(), ("example".to_string(), "get_foo".to_string()))
|
||||||
/// ```
|
/// ```
|
||||||
fn parse_tool_name(name: String) -> Result<(String, String), ChatError> {
|
pub fn parse_tool_name(name: String) -> Result<(String, String), ChatError> {
|
||||||
let (mcp_server_name, tool_name) = name
|
let (mcp_server_name, tool_name) = name
|
||||||
.split_once(":")
|
.split_once(":")
|
||||||
.ok_or(ChatError::FunctionParseError(name.clone()))?;
|
.ok_or(ChatError::FunctionParseError(name.clone()))?;
|
||||||
|
|||||||
Reference in New Issue
Block a user