Skip to content

feat(meta-llama): add timeout and max_retries to chat generator#2872

Merged
anakin87 merged 1 commit intodeepset-ai:mainfrom
Keyur-S-Patel:feat/meta-llama-chat-timeout-retries
Feb 26, 2026
Merged

feat(meta-llama): add timeout and max_retries to chat generator#2872
anakin87 merged 1 commit intodeepset-ai:mainfrom
Keyur-S-Patel:feat/meta-llama-chat-timeout-retries

Conversation

@Keyur-S-Patel
Copy link
Copy Markdown
Contributor

@Keyur-S-Patel Keyur-S-Patel commented Feb 25, 2026

Related Issues

  • partially addresses #9309

Proposed Changes:

  • Added timeout and max_retries to MetaLlamaChatGenerator.__init__.
  • Forwarded both fields to OpenAIChatGenerator via super().__init__(..., timeout=..., max_retries=...).
  • Included the new fields in to_dict serialization.
  • Updated unit tests to reflect actual default behavior and serde output:
    • default timeout/max_retries are None
    • explicit values are preserved when provided.

How did you test it?

  • Targeted tests:
    • test_init_default
    • test_to_dict_default
    • test_from_dict_fail_wo_env_var
  • Full file:
    • hatch run test:unit tests/test_llama_chat_generator.py

All selected tests passed on this branch.

Notes for the reviewer

  • Defaults are intentionally None in this integration path, and tests were adjusted accordingly.
  • The change is minimal and relies on existing OpenAI generator retry/timeout handling.

Checklist

@Keyur-S-Patel Keyur-S-Patel requested a review from a team as a code owner February 25, 2026 10:36
@Keyur-S-Patel Keyur-S-Patel requested review from anakin87 and removed request for a team February 25, 2026 10:36
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Feb 25, 2026

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions Bot added integration:meta-llama type:documentation Improvements or additions to documentation labels Feb 25, 2026
Copy link
Copy Markdown
Member

@anakin87 anakin87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

I also tested it locally and it works correctly.

@anakin87 anakin87 merged commit bf0bd43 into deepset-ai:main Feb 26, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration:meta-llama type:documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants