Allow any format for X-Request-Id
還沒有人認領這個 Issue。
評估
研究方向
這個 issue 出在 starlette-context 的請求 ID 驗證上。查看連結的測試檔案以了解 UUID 驗證。找到 starlette-context 在 llama-cpp-python 伺服器程式碼中的整合位置,可能在 middleware 設定附近。修改驗證邏輯,使其接受 X-Request-Id 的任何字串格式,而不只是 UUID。透過傳送帶有非 UUID X-Request-Id header 的請求進行測試,並確保回應為 200。
由索引模型根據 Issue 內容生成。
描述
Prerequisites
Please answer the following questions for yourself before submitting an issue.
- I am running the latest code. Development is very rapid so there are no tagged versions as of now.
- I carefully followed the README.md.
- I searched using keywords relevant to my issue to make sure that I am creating a new issue that is not already open (or closed).
- I reviewed the Discussions, and have a new bug or useful enhancement to share.
Expected Behavior
Normal response (200)
Current Behavior
400, Bad request
Environment and Context
Huggingface spaces docker
Failure Information (for bugs)
Feature introduced in https://github.com/abetlen/llama-cpp-python/pull/703, Huggingface Spaces already has x-request-id in the request, but it was not a valid uuid that starlette-context expected (https://github.com/tomwojcik/starlette-context/blob/992ab9401a9f557994379053fbd98471c601eda9/tests/test_plugins/test_request_id.py#L37), resulting in the server returning bad request 400.
- 主要語言
- Python
- 星號
- 10.6k
- 分支
- 1.5k
- 平均合併
- 23 分鐘
- 30 天內合併 PR
- 1
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
abetlen/llama-cpp-python 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 65/100
abetlen/llama-cpp-python#2352 ·
-
難度 2/5 1-3 小時 新手友好度 65/100
abetlen/llama-cpp-python#2211 · 2 則留言 ·
-
難度 2/5 1-3 小時 新手友好度 65/100
abetlen/llama-cpp-python#2210 ·
-
難度 2/5 1-3 小時 新手友好度 65/100
abetlen/llama-cpp-python#2145 ·
-
難度 1/5 1 小時以內 新手友好度 75/100
abetlen/llama-cpp-python#2135 · 4 個 reaction ·
查看 abetlen/llama-cpp-python 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 88/100
-
難度 2/5 1-3 小時 新手友好度 82/100
-
難度 2/5 1-3 小時 新手友好度 78/100
-
enhancement
難度 2/5 1-3 小時 新手友好度 72/100
-
難度 2/5 1-3 小時 新手友好度 74/100