mirror of
https://git.boos.lat/aibo/BossChat.git
synced 2026-10-31 15:46:12 +00:00
refactor(runtime): streamline request handling and improve tool preparation methods
This commit is contained in:
@@ -32,10 +32,7 @@ func buildRuntimeStaticTools() []registry.Tool {
|
||||
return ret
|
||||
}
|
||||
|
||||
func (c *toolCatalog) resolveForRun(req *Request) (*registry.ToolSet, error) {
|
||||
if req == nil || req.ToolSet != nil || c == nil || c.registry == nil {
|
||||
return nil, nil
|
||||
}
|
||||
func (c *toolCatalog) resolveForRun(req Request) (*registry.ToolSet, error) {
|
||||
return c.registry.Resolve(registry.Context{
|
||||
Conversation: req.Conversation,
|
||||
AIAgent: req.AIAgent,
|
||||
@@ -45,10 +42,7 @@ func (c *toolCatalog) resolveForRun(req *Request) (*registry.ToolSet, error) {
|
||||
})
|
||||
}
|
||||
|
||||
func (c *toolCatalog) resolveForResume(req *ResumeRequest) (*registry.ToolSet, error) {
|
||||
if req == nil || req.ToolSet != nil || c == nil || c.registry == nil {
|
||||
return nil, nil
|
||||
}
|
||||
func (c *toolCatalog) resolveForResume(req ResumeRequest) (*registry.ToolSet, error) {
|
||||
return c.registry.Resolve(registry.Context{
|
||||
Conversation: req.Conversation,
|
||||
AIAgent: req.AIAgent,
|
||||
|
||||
Reference in New Issue
Block a user