imbajin commented on code in PR #367:
URL: https://github.com/apache/hugegraph-ai/pull/367#discussion_r3452770656
##########
hugegraph-llm/src/hugegraph_llm/models/llms/ollama.py:
##########
@@ -34,13 +40,17 @@ def __init__(self, model: str, host: str = "127.0.0.1",
port: int = 11434, **kwa
self.client = ollama.Client(host=f"http://{host}:{port}", **kwargs)
self.async_client = ollama.AsyncClient(host=f"http://{host}:{port}",
**kwargs)
- @retry(tries=3, delay=1)
+ @retry(
Review Comment:
⚠️ **Add regression coverage for the new retry policy**
This changes both the retry library and the retry predicate/delay for
`generate()` and `agenerate()`, but the PR does not add a mock-based test for
retryable Ollama/httpx failures or for non-retryable errors. The module
guidance asks code changes to cover changed behavior; please add a
deterministic unit test that stubs `client.chat` / `async_client.chat` so CI
proves the new Tenacity policy is wired correctly without requiring an Ollama
service.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]