Skip to content

Commit

Permalink
prompt: Fix JobList Tokens (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
sunshineplan committed Jul 12, 2024
1 parent 7156a27 commit b3654ac
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions prompt/prompt.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,11 @@ func (prompt *Prompt) JobList(ctx context.Context, ai ai.AI, input []string, pre
resp, err := chat(ai, prompt.d, r.Prompt)
if err != nil {
r.Result = nil
r.Tokens = 0
r.Error = err
} else {
r.Result = resp.Results()
r.Tokens = resp.TokenCount().Total
r.Error = nil
}
c <- r
Expand Down

0 comments on commit b3654ac

Please sign in to comment.