Skip to content

Conversation

hi-pender
Copy link
Contributor

What type of PR is this?

Check the PR title.

  • This PR title match the format: <type>(optional scope): <description>
  • The description of this PR title is user-oriented and clear enough for others to understand.
  • Attach the PR updating the user documentation if the current PR requires user awareness at the usage level. User docs repo

(Optional) Translate the PR title into Chinese.

(Optional) More detailed description for this PR(en: English/zh: Chinese).

en:
zh(optional):

(Optional) Which issue(s) this PR fixes:

(optional) The PR that updates user documentation:

// NewPlan is a function type that creates a new Plan instance.
type NewPlan func(ctx context.Context) Plan
// PlanFactory is a function type that creates a new Plan instance.
type PlanFactory func(ctx context.Context) Plan

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚨 Breaking API Changes Detected

Package: github.com/cloudwego/eino/adk/prebuilt/planexecute

Incompatible changes:

  • ExecutionContext: removed
  • GenModelInputFn: removed
  • GenPlannerModelInputFn: changed from func(context.Context, []*github.com/cloudwego/eino/schema.Message) ([]*github.com/cloudwego/eino/schema.Message, error) to func(context.Context, []*github.com/cloudwego/eino/schema.Message, *PlannerConfig) ([]*github.com/cloudwego/eino/schema.Message, error)
  • NewPlan: removed
  • PlannerConfig.NewPlan: removed
  • ReplannerConfig.GenInputFn: changed from GenModelInputFn to GenReplannerModelInputFn
  • ReplannerConfig.NewPlan: removed
Review Guidelines

Please ensure that:

  • The changes are absolutely necessary
  • They are properly documented
  • Migration guides are provided if needed

⚠️ Please resolve this thread after reviewing the breaking changes.

Copy link

github-actions bot commented Sep 12, 2025

📊 Coverage Report:

File coverage threshold (20%) satisfied:	PASS
Package coverage threshold (30%) satisfied:	PASS
Total coverage threshold (83%) satisfied:	PASS
Total test coverage: 83.3% (6250/7500)


// GenPlannerModelInputFn is a function type that generates input messages for the planner.
type GenPlannerModelInputFn func(ctx context.Context, userInput []adk.Message) ([]adk.Message, error)
type GenPlannerModelInputFn func(ctx context.Context, userInput []adk.Message, cfg *PlannerConfig) ([]adk.Message, error)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个为啥入参是 planner config 啊

feat: change NewPlan to PlanFactory

feat: adjust comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants