Refactor Knowledge struct into shared package
Moved the Knowledge struct and related types to the shared package, updating all references across the codebase. This improves modularity and enables better reuse of the Knowledge type across different components.
This commit is contained in:
@@ -23,12 +23,12 @@ type Agent struct {
|
||||
// Model is the chat completion model to use
|
||||
Model gollm.ChatCompletion
|
||||
|
||||
OnLoopComplete func(ctx context.Context, knowledge agents.Knowledge) error
|
||||
OnLoopComplete func(ctx context.Context, knowledge shared.Knowledge) error
|
||||
|
||||
OnCommandStart func(ctx context.Context, command string) error
|
||||
OnCommandDone func(ctx context.Context, command string, output string, err error) error
|
||||
|
||||
OnDone func(ctx context.Context, knowledge agents.Knowledge) error
|
||||
OnDone func(ctx context.Context, knowledge shared.Knowledge) error
|
||||
|
||||
ContextualInformation []string
|
||||
|
||||
@@ -36,7 +36,7 @@ type Agent struct {
|
||||
}
|
||||
|
||||
type Response struct {
|
||||
Knowledge agents.Knowledge
|
||||
Knowledge shared.Knowledge
|
||||
DataDir string
|
||||
OutputDir string
|
||||
}
|
||||
@@ -52,7 +52,7 @@ func (a Agent) Answer(ctx context.Context, questions []string) (Response, error)
|
||||
a.MaxCommands = 20 // Default to 20 commands as per requirements
|
||||
}
|
||||
|
||||
res.Knowledge = agents.Knowledge{
|
||||
res.Knowledge = shared.Knowledge{
|
||||
OriginalQuestions: questions,
|
||||
RemainingQuestions: questions,
|
||||
}
|
||||
|
Reference in New Issue
Block a user