Closed Dogtiti closed 3 months ago
@Dogtiti is attempting to deploy a commit to the NextChat Team on Vercel.
A member of the Team first needs to authorize it.
The recent updates centralize around enhancing request handling and URL construction for Google services in the application. Key changes include the introduction of a new request
function, refactoring of the GeminiProApi
class to use a new path
method, and modification of the Google ChatPath endpoint. These changes aim to improve code clarity, streamline URL construction, and enhance request processing.
File | Change Summary |
---|---|
app/api/google/[...path]/route.ts |
Refactored imports, restructured request handling, added new request function, updated fetch URL logic, adjusted timeout handling. |
app/client/platforms/google.ts |
Updated GeminiProApi class with new path method, refactored URL construction logic to use path , removed ensureProperEnding function. |
app/constant.ts |
Modified ChatPath in Google constant to change endpoint from generateContent to streamGenerateContent . |
sequenceDiagram
participant Client
participant ApiPath
participant GoogleService
participant Backend
Client->>ApiPath: Request with apiKey and path
ApiPath->>GoogleService: Construct URL using path method
GoogleService->>Backend: Send request to constructed URL
Backend-->>GoogleService: Return response
GoogleService-->>Client: Send back response
sequenceDiagram
participant Client
participant GoogleService
participant Backend
Client->>GoogleService: Request with path
GoogleService->>Backend: Construct URL and send request
Backend-->>GoogleService: Return response
GoogleService-->>Client: Send back response
sequenceDiagram
participant Client
participant GoogleService
participant PathMethod
participant Backend
Client->>GoogleService: Request with path
GoogleService->>PathMethod: Use path method to construct URL
PathMethod-->>GoogleService: Return constructed URL
GoogleService->>Backend: Send request with constructed URL
Backend-->>GoogleService: Return response
GoogleService-->>Client: Send back response
In code, a new path we weave,
With URLs that never deceive,
Requests now clear and bright,
In the server's gentle light,
Our functions, like stars, achieve.
🌟✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Your build has completed!
[Preview deployment]()
fix #5053 #5030 #5028 #5014 #5003
Bot detected the issue body's language is not English, translate it automatically.
fix #5053 #5030 #5028 #5014 #5003
💻 变更类型 | Change Type
🔀 变更说明 | Description of Change
📝 补充信息 | Additional Information
Summary by CodeRabbit
New Features
path
method toGeminiProApi
for dynamic URL construction.Bug Fixes
streamGenerateContent
for better content generation.Refactor
GeminiProApi
.Chores