@@ -26,7 +26,6 @@ func (w *DPromptsWorker) Timeout(job *river.Job[DPromptsJobArgs]) time.Duration
2626 return 5 * time .Minute
2727}
2828
29-
3029func (w * DPromptsWorker ) Work (ctx context.Context , job * river.Job [DPromptsJobArgs ]) error {
3130 log .Info ().
3231 Str ("job_id" , strconv .FormatInt (job .ID , 10 )).
@@ -40,8 +39,7 @@ func (w *DPromptsWorker) Work(ctx context.Context, job *river.Job[DPromptsJobArg
4039 }
4140 configPath := homeDir + string (os .PathSeparator ) + ".dprompts.toml"
4241
43-
44- response , err := CallOllama (job .Args .Message , configPath )
42+ response , err := CallOllama (job .Args .Prompt , configPath )
4543 if err != nil {
4644 log .Error ().Err (err ).Msg ("Ollama call failed" )
4745 return err
@@ -50,7 +48,6 @@ func (w *DPromptsWorker) Work(ctx context.Context, job *river.Job[DPromptsJobArg
5048 Str ("job_id" , strconv .FormatInt (job .ID , 10 )).
5149 Msg ("Ollama call successful, saving to DB" )
5250
53-
5451 jsonResponse , err := json .Marshal (map [string ]string {"response" : response })
5552 if err != nil {
5653 log .Error ().Err (err ).Msg ("Failed to marshal response as JSON" )
@@ -67,7 +64,6 @@ func (w *DPromptsWorker) Work(ctx context.Context, job *river.Job[DPromptsJobArg
6764 return err
6865 }
6966
70-
7167 log .Info ().
7268 Str ("job_id" , strconv .FormatInt (job .ID , 10 )).
7369 Msg ("Job completed and saved" )
0 commit comments