mirror of https://github.com/harness/drone.git
fix: [ML-505]: Fix generate step API input type (#3120)
* fix: [ML-505]: Fix generate step API input typepull/3597/head
parent
cfa4e351c4
commit
f82dd44d57
|
@ -24,7 +24,7 @@ import (
|
||||||
|
|
||||||
func (c *Controller) GeneratePipelineStep(
|
func (c *Controller) GeneratePipelineStep(
|
||||||
ctx context.Context,
|
ctx context.Context,
|
||||||
in *controllertypes.GeneratePipelineInput,
|
in *controllertypes.GeneratePipelineStepInput,
|
||||||
) (*controllertypes.GeneratePipelineStepOutput, error) {
|
) (*controllertypes.GeneratePipelineStepOutput, error) {
|
||||||
generateRequest := &aitypes.PipelineStepGenerateRequest{
|
generateRequest := &aitypes.PipelineStepGenerateRequest{
|
||||||
Prompt: in.Prompt,
|
Prompt: in.Prompt,
|
||||||
|
|
|
@ -27,7 +27,7 @@ func HandleGeneratePipelineStep(aiagentCtrl *aiagent.Controller) http.HandlerFun
|
||||||
return func(w http.ResponseWriter, r *http.Request) {
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
ctx := r.Context()
|
ctx := r.Context()
|
||||||
|
|
||||||
in := new(controllertypes.GeneratePipelineInput)
|
in := new(controllertypes.GeneratePipelineStepInput)
|
||||||
err := json.NewDecoder(r.Body).Decode(in)
|
err := json.NewDecoder(r.Body).Decode(in)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
render.BadRequestf(ctx, w, "Invalid Request Body: %s.", err)
|
render.BadRequestf(ctx, w, "Invalid Request Body: %s.", err)
|
||||||
|
|
Loading…
Reference in New Issue