(test) hosted ollama - retry 3 times

This commit is contained in:
ishaan-jaff 2024-01-05 17:58:59 +05:30
parent 90973d92bf
commit 0eb899c087

View file

@ -749,10 +749,14 @@ def test_completion_ollama_hosted():
model="ollama/phi", model="ollama/phi",
messages=messages, messages=messages,
max_tokens=10, max_tokens=10,
num_retries=3,
timeout=90,
api_base="https://test-ollama-endpoint.onrender.com", api_base="https://test-ollama-endpoint.onrender.com",
) )
# Add any assertions here to check the response # Add any assertions here to check the response
print(response) print(response)
except Timeout as e:
pass
except Exception as e: except Exception as e:
pytest.fail(f"Error occurred: {e}") pytest.fail(f"Error occurred: {e}")