update model
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
package handlers
|
package handlers
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"hal/env"
|
"hal/env"
|
||||||
"hal/openai"
|
"hal/openai"
|
||||||
"log"
|
"log"
|
||||||
@@ -26,8 +25,6 @@ func OnMessageCreated(s *discordgo.Session, m *discordgo.MessageCreate) {
|
|||||||
if _, err = s.ChannelMessageSend(m.ChannelID, aiResponse); err != nil {
|
if _, err = s.ChannelMessageSend(m.ChannelID, aiResponse); err != nil {
|
||||||
log.Panicf("failed to send the response [%s] to the discord channel [%s]", aiResponse, err.Error())
|
log.Panicf("failed to send the response [%s] to the discord channel [%s]", aiResponse, err.Error())
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
fmt.Println("### no response ##")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|||||||
+1
-1
@@ -21,7 +21,7 @@ func NewClient(token string) *Client {
|
|||||||
|
|
||||||
func (c Client) Completions(prompt string) (*CompletionResponse, error) {
|
func (c Client) Completions(prompt string) (*CompletionResponse, error) {
|
||||||
body := &CompletionPayload{
|
body := &CompletionPayload{
|
||||||
Model: "gpt-3.5-turbo",
|
Model: "text-davinci-003",
|
||||||
Prompt: cleanPrompt(prompt),
|
Prompt: cleanPrompt(prompt),
|
||||||
MaxTokens: 100,
|
MaxTokens: 100,
|
||||||
Temperature: 1,
|
Temperature: 1,
|
||||||
|
|||||||
Reference in New Issue
Block a user