[_]
This commit is contained in:
parent
52a15bab2f
commit
4e37119714
3 changed files with 4 additions and 3 deletions
2
.github/workflows/pr-test.yml
vendored
2
.github/workflows/pr-test.yml
vendored
|
|
@ -38,6 +38,8 @@ env:
|
|||
MONGO_TEST_USER: "root"
|
||||
MONGO_TEST_PASS: "123456"
|
||||
|
||||
OPENAI_TEST_KEY: ${{ secrets.OPENAI_TEST_KEY }}
|
||||
|
||||
TAB_NAME: "::PET ADMIN"
|
||||
PAGE_SIZE: "20"
|
||||
PAGE_LINK: "https://yaoapps.com"
|
||||
|
|
|
|||
2
.github/workflows/unit-test.yml
vendored
2
.github/workflows/unit-test.yml
vendored
|
|
@ -42,6 +42,8 @@ env:
|
|||
MONGO_TEST_USER: "root"
|
||||
MONGO_TEST_PASS: "123456"
|
||||
|
||||
OPENAI_TEST_KEY: ${{ secrets.OPENAI_TEST_KEY }}
|
||||
|
||||
TAB_NAME: "::PET ADMIN"
|
||||
PAGE_SIZE: "20"
|
||||
PAGE_LINK: "https://yaoapps.com"
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ import (
|
|||
"github.com/yaoapp/gou/connector"
|
||||
"github.com/yaoapp/gou/http"
|
||||
"github.com/yaoapp/kun/exception"
|
||||
"github.com/yaoapp/kun/utils"
|
||||
)
|
||||
|
||||
// Tiktoken get number of tokens
|
||||
|
|
@ -187,8 +186,6 @@ func (openai OpenAI) stream(path string, payload map[string]interface{}, cb func
|
|||
func (openai OpenAI) isError(res *http.Response) *exception.Exception {
|
||||
|
||||
if res.Status != 200 {
|
||||
utils.Dump(res)
|
||||
|
||||
message := "OpenAI Error"
|
||||
if data, ok := res.Data.(map[string]interface{}); ok {
|
||||
if err, has := data["error"]; has {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue