Commit Graph

6 Commits

Author SHA1 Message Date
Laisky.Cai
7239b3386a Merge remote-tracking branch 'origin/upstream/main' 2023-12-12 06:00:29 +00:00
JustSong
495fc628e4 feat: support gpt-4 with vision (#683, #714) 2023-11-19 18:38:54 +08:00
Laisky.Cai
14108ce24d feat: Refactor vision message handling and increase commit short SHA length
- Increase the length of the commit short SHA from 8 to 7 characters
- Update relay-aiproxy.go to handle multiple content types in the last message
- Refactor and modify countVisonTokenMessages function in relay-utils.go to handle different content types and update token counts accordingly
- Update VisionMessage struct in relay.go to have Content as a slice of OpenaiVisionMessageContent
2023-11-17 05:26:39 +00:00
Laisky.Cai
8b477d896d feat: Refactor message handling and update dependencies
- Added required packages to go.mod: `github.com/Laisky/errors/v2 v2.0.1`, `github.com/stretchr/testify v1.8.3`, `github.com/davecgh/go-spew v1.1.1`, `github.com/pmezard/go-difflib v1.0.0`
- Increased the number of returned recordings to 100 in `relay-utils.go`
- Refactored and simplified code in `relay-aiproxy.go` for improved message retrieval and error handling
- Added new test file `relay_test.go` and various test cases for different message types
- Modified functions in `group.go` and `relay.go` for improved functionality
2023-11-17 03:24:55 +00:00
Laisky.Cai
b58bd7e3ab feat: support vision
- Added new dependencies: `github.com/fsnotify/fsnotify v1.4.9`, `github.com/go-playground/assert/v2 v2.2.0`, `github.com/nxadm/tail v1.4.8`, `github.com/onsi/ginkgo v1.16.5`, `github.com/onsi/gomega v1.18.1`, `golang.org/x/net v0.10.0`, `gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7`
- Updated dependencies: `github.com/gin-gonic/gin` from v1.9.0 to v2.0.0, `golang.org/x/net` from v0.17.0 to v0.10.0
- Removed dependencies: `github.com/golang-jwt/jwt v3.2.2+incompatible`, `github.com/gorilla/websocket v1.5.1`
- Updated Go version from `1.18` to `1.21`
- Made various modifications and refactoring in the code:
  - Added new struct `VisionMessage` with fields `Role`, `Content`, and `Name`
  - Added constants for certain types
  - Added methods and error handling to handle different message types
  - Modified existing struct and methods to accommodate changes
  - Removed unused imports
2023-11-17 01:59:11 +00:00
JustSong
04acdb1ccb feat: support aiproxy's library 2023-09-03 12:51:59 +08:00