diff --git a/action/reasoning.go b/action/reasoning.go new file mode 100644 index 0000000..1ee48dd --- /dev/null +++ b/action/reasoning.go @@ -0,0 +1,33 @@ +package action + +import ( + "github.com/sashabaranov/go-openai/jsonschema" +) + +func NewReasoning() *ReasoningAction { + return &ReasoningAction{} +} + +type ReasoningAction struct{} + +type ReasoningResponse struct { + Reasoning string `json:"reasoning"` +} + +func (a *ReasoningAction) Run(ActionParams) (string, error) { + return "no-op", nil +} + +func (a *ReasoningAction) Definition() ActionDefinition { + return ActionDefinition{ + Name: "think", + Description: "try to understand what's the best thing to do", + Properties: map[string]jsonschema.Definition{ + "reasoning": { + Type: jsonschema.String, + Description: "A detailed reasoning on what would you do in this situation.", + }, + }, + Required: []string{"reasoning"}, + } +}