Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #75

Merged
merged 9 commits into from
Jun 17, 2024
Merged

Dev #75

merged 9 commits into from
Jun 17, 2024

Conversation

aurorax-neo
Copy link
Owner

No description provided.

This commit reorganizes several files and updates dependencies to enhance project structure and efficiency:

- Moved files:
  - AccAuthPool.go to AccessTokenPool.go
  - AccTokens.go to AccTokens.go
  - apiReq.go to apiReq.go
  - apiRespJson.go to apiRespJson.go
  - apiRespStream.go to apiRespStream.go
  - chatReq.go to chatReq.go
  - chatResp.go to chatResp.go
  - completions.go to completions.go
  - FreeChat.go to FreeChat.go

- Updated Docker build YAML:
  - Fixed typo in cache-from option.
  - Modified cache-to to correct syntax.

- Refactored common.go:
  - Removed unused imports and functions.
  - Added logger configuration options for improved logging performance.

- Updated config.go:
  - Corrected import path for AccessTokenPool.

- Updated FreeChat.go:
  - Updated import paths to reflect AccessTokenPool.

- Updated go.mod and go.sum:
  - Updated dependencies for tls_client_httpi, tls-client, and go-logger.

These changes optimize file structure, correct configuration settings, and update dependencies to latest versions for better project maintenance and performance.
… and `util.go`

- Fixed syntax issues and added `ForceUseSse` and `FaceUseSse` fields in `chatReq.go`.
- Initialized `ForceUseSse` as `false` and `FaceUseSse` as `true` in `util.go`.
- Added YAML tags (`yaml:"token,omitempty"`, `yaml:"expires_at,omitempty"`, `yaml:"-"`) to `Token`, `ExpiresAt`, and `CanUseAt` fields in `AccessTokenPool.go`.
- Renamed methods:
  - `AddToken` to `AddAccessToken` in `AccessTokenPool.go`.
  - `AppendTokens` to `AppendAccessTokens` in `AccessTokenPool.go`.
- Introduced `IsFileExist` and `ReadFile` functions in `common.go` to handle file existence check and file reading, respectively.
- Updated `config.go` to use `TokensFile` instead of `AccessTokens` and load tokens from the file specified in `TOKENS_FILE`.
- Adjusted README.md to reflect changes related to `TOKENS_FILE` and removed references to `ACCESS_TOKENS`.
- Modified `util.go` to update `ForceUseSse` and `FaceUseSse` values.

These changes optimize YAML handling, improve file operations, and update method names for clarity and consistency.
…ml` to `.yml`

fix: enhance conditional logic in `AccessTokenPool.go` to include expiration check

refactor: improve `FreeChat.go` to handle token retrieval and error case more efficiently

docs: update README.md for clarity on token usage and error handling
Updated `go.mod` and `go.sum` to reflect changes:
- Removed `github.com/gorilla/websocket v1.5.1` from `go.mod`.
- Added `gopkg.in/yaml.v3 v3.0.1` to `go.mod`.
- Removed entries for `github.com/donnie4w/go-logger v0.24.1` from `go.sum`.
- Removed `github.com/gorilla/websocket v1.5.1` entries from `go.sum`.
Adjusted deployment option from Koyeb to Vercel and added Vercel deployment button.
@aurorax-neo aurorax-neo merged commit 5011a56 into master Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant