[Integration]: Time Budget Hook

Đang mở
#833 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 9 ngày

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

Đánh giá

Độ khó
1/5
Thời gian dự kiến
Dưới một giờ
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
ai

Hướng nghiên cứu

The issue describes a published integration in a separate repository and provides no files, tests, or entry points in this repository to start from. Read the linked integration and the referenced Haystack request to understand its status; there is no specific change or completion criterion stated for this issue.

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

Mô tả

Stage

Ready: integration exists and works, proposing to list it

Integration or project name

Time Budget Hook

Integration type

Other

Published package or repo (if it exists)

https://pypi.org/project/time-budget-hook-haystack/ and https://github.com/aryamangodara/time-budget-hook-haystack

Need or proof of use

Requested in deepset-ai/haystack#13623. A Haystack maintainer asked for it to be built as a hook modeled on TokenBudgetHook, published as a separate integration rather than added to core (comment).

Use case: Agents behind an API with a request timeout, or Agents that call slow tools, need a limit on how long a run takes. max_agent_steps caps steps and TokenBudgetHook caps tokens, but neither caps time.

The package is published on PyPI and tested in CI on Python 3.10 and 3.14 against haystack-ai 3.2.0 and 3.5.0. It has full sync and async Agent runs in its test suite and an offline example script.

Short description

An Agent hook that stops a run once it has been running for a set number of seconds, ending with exit_reason == "time_budget_exceeded". It complements max_agent_steps and TokenBudgetHook for Agents that need to finish within a time limit, such as those behind an API with a request timeout or calling slow tools.

Ngôn ngữ chính
Python
Star
114
Fork
332
Merge trung bình
5 ngày 1 giờ
Pull request đã merge (30 ngày)
13

Chuẩn bị môi trường

  • Không có Dockerfile hay tệp Docker Compose
  • Có mẫu pull request
  • Không có 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 deepset-ai/haystack-integrations

Tất cả issue của deepset-ai/haystack-integrations

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.