some new
This commit is contained in:
@@ -3,6 +3,7 @@ package plugins
|
||||
import (
|
||||
"io"
|
||||
"strings"
|
||||
"time"
|
||||
"ymgb/database"
|
||||
"ymgb/openai"
|
||||
"ymgb/utils/ai"
|
||||
@@ -20,7 +21,7 @@ func RegisterAi() *laniakea.Plugin[database.Context] {
|
||||
func gptTest(ctx *laniakea.MsgContext, _ *database.Context) {
|
||||
q := strings.Join(ctx.Args, " ")
|
||||
m := ctx.Answer("Генерация запущена")
|
||||
api := openai.NewOpenAIAPI(ai.GPTBaseUrl, "", "anthropic/claude-sonnet-4")
|
||||
api := openai.NewOpenAIAPI(ai.GPTBaseUrl, "", "gpt-5.2")
|
||||
resp, err := api.CreateCompletionStream([]openai.Message{}, q, 1.0)
|
||||
if err != nil {
|
||||
m.Delete()
|
||||
@@ -55,6 +56,7 @@ func gptTest(ctx *laniakea.MsgContext, _ *database.Context) {
|
||||
//draft.Flush()
|
||||
break
|
||||
}
|
||||
time.Sleep(time.Millisecond * 250)
|
||||
}
|
||||
err = draft.Flush()
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user