1
0
mirror of https://github.com/fumiama/deepinfra.git synced 2026-06-05 00:32:46 +08:00

feat: add error status to Request

This commit is contained in:
源文雨
2025-02-22 21:38:07 +09:00
parent e969fc5b4c
commit c64d9d26d2
2 changed files with 10 additions and 15 deletions

View File

@@ -1,8 +1,6 @@
package deepinfra
import (
"fmt"
"github.com/fumiama/deepinfra/model"
)
@@ -10,16 +8,3 @@ type Model interface {
model.Inputer
model.Outputer
}
func init() {
api := NewAPI(APIDeepInfra, "PUT YOUR API KEY HERE")
txt, err := api.Request(model.NewOpenAI("fumiama/ninus", "", 0.7, 0.9, 1024).
System("你正在QQ群与用户聊天用户发送了消息。按自己的心情简短思考后条理清晰地回应**一句话**,禁止回应多句。").
User("总不能什么都查吧").User("后面DOGE就成恶龙了 很常见的场景"),
)
if err != nil {
panic(err)
}
fmt.Println(txt)
// 要不我给你查一下?
}