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 #68

Merged
merged 1 commit into from
May 17, 2024
Merged

dev #68

merged 1 commit into from
May 17, 2024

Conversation

aurorax-neo
Copy link
Owner

No description provided.

- Refactored DeepCopyStruct function in common.go to utilize JSON serialization and deserialization for deep copying structs.
- Removed the previous implementation involving reflection and recursion.
- Updated function signature to accept 'original' instead of 'src'.
- JSON marshalling of 'original' is performed to obtain its byte representation.
- The byte representation is then unmarshalled into a new target interface{}.
- Returns the target interface{} as the deep copy of the original struct.

Adjust FreeGpt35Pool refresh interval and instance handling

- Modified the refresh interval of FreeGpt35Pool in FreeGpt35Pool.go from 256 milliseconds to 128 milliseconds.
- Revised the handling of FreeGpt35 instances in the FreeGpt35Pool.go file:
  - Removed the DeepCopyStruct function call and its dependencies.
  - Adjusted the logic to decrement the MaxUseCount directly.
  - Replaced references to the DeepCopyStruct function with direct struct manipulation.

Update dependencies in go.mod and go.sum

- Updated golang.org/x/crypto to version v0.23.0 in go.mod and go.sum.
- Added indirect dependencies:
  - github.com/EDDYCJY/fake-useragent v0.2.0
  - github.com/PuerkitoBio/goquery v1.9.2
  - github.com/andybalholm/cascadia v1.3.2
- Updated golang.org/x/net, golang.org/x/sys, and golang.org/x/text to newer versions in go.sum.

Adjust headers in gpt35Completions.go

- Added "Accept-Encoding" and "Accept" headers to the HTTP request in gpt35Completions.go to support gzip, deflate, br encoding and text/event-stream response.

Refine ProxyPool implementation in ProxyPool.go

- Simplified the NewProxy function in ProxyPool.go to remove the 'ua' parameter.
- Removed the 'ua' field from the Proxy struct and its related initialization logic.
@aurorax-neo aurorax-neo merged commit 009a1fc into master May 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