mirror of
https://github.com/httprunner/httprunner.git
synced 2026-07-09 06:23:52 +08:00
feat: add MCP tools registration to LLM service
- Add RegisterTools method to ILLMService interface - Create shared MCP to eino tool converter - Auto-register built-in uixt tools in XTDriver initialization - Refactor MCPHost to use shared converter - Add comprehensive test coverage for tool conversion This enables doubao-1.5-thinking-vision-pro model to access MCP tools through function calling mechanism.
This commit is contained in:
@@ -38,6 +38,13 @@ func NewXTDriver(driver IDriver, opts ...option.AIServiceOption) (*XTDriver, err
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "init llm service failed")
|
||||
}
|
||||
|
||||
// Register uixt MCP tools to LLM service
|
||||
mcpTools := driverExt.client.Server.ListTools()
|
||||
einoTools := ai.ConvertMCPToolsToEinoToolInfos(mcpTools, "uixt")
|
||||
if err := driverExt.LLMService.RegisterTools(einoTools); err != nil {
|
||||
log.Warn().Err(err).Msg("failed to register uixt tools")
|
||||
}
|
||||
}
|
||||
|
||||
return driverExt, nil
|
||||
|
||||
Reference in New Issue
Block a user