Allow any format for X-Request-Id

Đang mở Phù hợp với người mới
#1,337 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
65/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
api, backend

Hướng nghiên cứu

Issue nằm ở phần xác thực request ID của starlette-context. Hãy xem file test được liên kết để biết cách xác thực UUID. Tìm nơi starlette-context được tích hợp trong mã server của llama-cpp-python, có thể là quanh phần thiết lập middleware. Sửa phần xác thực để chấp nhận mọi định dạng string cho X-Request-Id, không chỉ UUID. Kiểm thử bằng cách gửi một request với header X-Request-Id không phải UUID và đảm bảo nhận được phản hồi 200.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement

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.

Ngôn ngữ chính
Python
Star
10.6k
Fork
1.5k
Merge trung bình
23 phút
Pull request đã merge (30 ngày)
1

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của abetlen/llama-cpp-python

Tất cả issue của abetlen/llama-cpp-python

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.