Skip to content

Commit 38fe77e

Browse files
revert model/ai_service.go to master version
Co-authored-by: Le He <AnnatarHe@users.noreply.github.com>
1 parent 11854c4 commit 38fe77e

1 file changed

Lines changed: 2 additions & 14 deletions

File tree

model/ai_service.go

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,6 @@ import (
77
"github.com/PromptPal/go-sdk/promptpal"
88
)
99

10-
// PPPromptGuessNextPromptVariables represents variables used for AI prompt
11-
type PPPromptGuessNextPromptVariables struct {
12-
Shell string `json:"shell"`
13-
Os string `json:"os"`
14-
Query string `json:"query"`
15-
}
16-
17-
// PPPromptGuessNextPrompt is the prompt template identifier
18-
type PPPromptGuessNextPrompt string
19-
20-
const PPPromptGuessNextPromptTemplate PPPromptGuessNextPrompt = "guess-next-prompt"
21-
2210
type AIService interface {
2311
QueryCommand(ctx context.Context, systemContext PPPromptGuessNextPromptVariables, userId string) (string, error)
2412
}
@@ -63,7 +51,7 @@ func (s promptPalAIService) QueryCommand(
6351
systemContext PPPromptGuessNextPromptVariables,
6452
userId string,
6553
) (string, error) {
66-
response, err := s.client.Execute(ctx, string(PPPromptGuessNextPromptTemplate), PPPromptGuessNextPromptVariables{
54+
response, err := s.client.Execute(ctx, string(PPPromptGuessNextPrompt), PPPromptGuessNextPromptVariables{
6755
Shell: systemContext.Shell,
6856
Os: systemContext.Os,
6957
Query: systemContext.Query,
@@ -74,4 +62,4 @@ func (s promptPalAIService) QueryCommand(
7462
}
7563

7664
return response.ResponseMessage, nil
77-
}
65+
}

0 commit comments

Comments
 (0)