Skip to content

Commit

Permalink
docs: update README
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidKk committed Jan 26, 2024
1 parent e9e5d14 commit abcf3a8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Due to network conditions and geographical locations, access to the Gemini API c
- If the `role` of the last or the first message in the message context is not `user`, the error `Please ensure that multiturn requests ends with a user role or a function response.` may occur. Therefore, if the `role` of the first message is not `user`, the service will automatically delete the first (ie. the first) message. If the `role` of the last message is not user, an error will be reported and the message will not be sent to Gemini.
- Only when the parameters meet all the conditions of `body`, `key` and `Method`, can a normal request be made, otherwise a `401` error will be returned.
- Since Vercel may interrupt data, the service will first return a `200` status, wait for Gemini's reply, and return it to the user in the form of a stream.
- Check the log situation via the Vercel console Log.

## Deploy With Vercel

Expand Down
1 change: 1 addition & 0 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Vercel Edge 上的 Gemini API 代理是一项代理服务,旨在解决某些
- 如果消息上下文最后一条信息或第一条信息 `role` 不为 `user` 时,可能会出现 `Please ensure that multiturn requests ends with a user role or a function response.` 错误。因此若第一条信息 `role` 不为 `user`时,服务会自动删除第一条(即第一条)信息。若最后一条信息 `role` 不为 `user` 时,将会报错不会将信息发送给 `Gemini`
- 仅当参数都满足条件 `body``key``Method`,才能正常请求,否则均返回 `401` 错误。
- 由于 Vercel 可能会中断数据,因此服务会优先返回 `200` 状态,且等待 Gemini 的回复,并通过流的形式返回给用户。
- 可以通过 Vercel 控制台 Log 查看日志情况。

## 使用 Vercel 部署

Expand Down

0 comments on commit abcf3a8

Please sign in to comment.