feat: Handle OpenAI requests depending on the model type

- Update `golang.org/x/image` and `golang.org/x/net` to their latest versions.
- Convert the request to the correct request type based on the model.
- Handle the request and response differently depending on the API type.
This commit is contained in:
Laisky
2024-01-08 03:39:08 +00:00
parent 9d4d9af915
commit e3d5c5fccb
3 changed files with 11 additions and 5 deletions

4
go.mod
View File

@@ -15,7 +15,7 @@ require (
github.com/pkoukk/tiktoken-go v0.1.6
github.com/stretchr/testify v1.8.4
golang.org/x/crypto v0.17.0
golang.org/x/image v0.14.0
golang.org/x/image v0.15.0
gorm.io/driver/mysql v1.5.2
gorm.io/driver/postgres v1.5.4
gorm.io/driver/sqlite v1.5.4
@@ -56,7 +56,7 @@ require (
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/ugorji/go/codec v1.2.11 // indirect
golang.org/x/arch v0.5.0 // indirect
golang.org/x/net v0.16.0 // indirect
golang.org/x/net v0.19.0 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/text v0.14.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect