- Updated the Stream method to return a structured response, including create, done, and completion hooks. - Introduced new methods for managing message history and building LLM requests, enhancing modularity. - Refactored the Script type to utilize a new hook structure, improving code organization. - Removed the obsolete hooks file to streamline the codebase. - Enhanced context types with additional fields for better integration with LLM models.
10 lines
326 B
Go
10 lines
326 B
Go
package hook
|
|
|
|
import (
|
|
"github.com/yaoapp/yao/agent/context"
|
|
)
|
|
|
|
// Done done hook
|
|
func (s *Script) Done(ctx *context.Context, inputMessages []context.Message, completionResponse *context.ResponseCompletion, mcpResponse *context.ResponseHookMCP) (*context.ResponseHookDone, error) {
|
|
return &context.ResponseHookDone{}, nil
|
|
}
|