feat(gateway): 优化OpenAI适配器实现
1. 使用bufio.Scanner代替io.ReadLine进行流式读取,提高效率 2. MapError返回ProviderError结构化错误码,便于错误处理和追踪 3. 更新go.mod添加必要依赖
This commit is contained in:
@@ -3,10 +3,19 @@ module lijiaoqiao/gateway
|
||||
go 1.21
|
||||
|
||||
require (
|
||||
github.com/golang-jwt/jwt/v5 v5.2.0
|
||||
github.com/jackc/pgx/v5 v5.5.0
|
||||
github.com/stretchr/testify v1.8.1
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/jackc/pgx/v5 v5.5.0
|
||||
golang.org/x/net v0.19.0
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/jackc/pgpassfile v1.0.0 // indirect
|
||||
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect
|
||||
github.com/jackc/puddle/v2 v2.2.1 // indirect
|
||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||
github.com/stretchr/objx v0.5.0 // indirect
|
||||
golang.org/x/crypto v0.9.0 // indirect
|
||||
golang.org/x/sync v0.1.0 // indirect
|
||||
golang.org/x/text v0.9.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user