Running e2e STAGE NUA tests #847
GitHub Actions / JUnit Test Report
failed
Dec 31, 2024 in 0s
270 tests run, 89 passed, 180 skipped, 1 failed.
Annotations
Check failure on line 11 in nua/e2e/regional/test_llm_generate.py
github-actions / JUnit Test Report
test_llm_generate.test_llm_generate[https://europe-1.stashify.cloud-claude-3]
pydantic_core._pydantic_core.ValidationError: 1 validation error for GenerativeChunk
Invalid JSON: EOF while parsing a value at line 1 column 0 [type=json_invalid, input_value='', input_type=str]
For further information visit https://errors.pydantic.dev/2.10/v/json_invalid
Raw output
nua_config = <nuclia.lib.nua.AsyncNuaClient object at 0x7fd2ab4bd610>
model = 'claude-3'
@pytest.mark.asyncio_cooperative
@pytest.mark.parametrize("model", ALL_LLMS)
async def test_llm_generate(nua_config: AsyncNuaClient, model):
np = AsyncNucliaPredict()
> generated = await np.generate(
"Which is the capital of Catalonia?", model=model, nc=nua_config
)
nua/e2e/regional/test_llm_generate.py:11:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/hostedtoolcache/Python/3.12.8/x64/lib/python3.12/site-packages/nuclia/decorators.py:126: in async_wrapper_checkout_nua
return await func(*args, **kwargs)
/opt/hostedtoolcache/Python/3.12.8/x64/lib/python3.12/site-packages/nuclia/sdk/predict.py:217: in generate
return await nc.generate(body, model)
/opt/hostedtoolcache/Python/3.12.8/x64/lib/python3.12/site-packages/nuclia/lib/nua.py:527: in generate
async for chunk in self._stream(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <nuclia.lib.nua.AsyncNuaClient object at 0x7fd2ab4bd610>, method = 'POST'
url = 'https://europe-1.stashify.cloud/api/v1/predict/chat?model=claude-3'
payload = {'chat_history': [], 'citations': False, 'context': [], 'generative_model': None, ...}
timeout = 300
async def _stream(
self,
method: str,
url: str,
payload: Optional[dict[Any, Any]] = None,
timeout: int = 60,
) -> AsyncIterator[GenerativeChunk]:
async with self.stream_client.stream(
method,
url,
json=payload,
timeout=timeout,
) as response:
async for json_body in response.aiter_lines():
> yield GenerativeChunk.model_validate_json(json_body) # type: ignore
E pydantic_core._pydantic_core.ValidationError: 1 validation error for GenerativeChunk
E Invalid JSON: EOF while parsing a value at line 1 column 0 [type=json_invalid, input_value='', input_type=str]
E For further information visit https://errors.pydantic.dev/2.10/v/json_invalid
/opt/hostedtoolcache/Python/3.12.8/x64/lib/python3.12/site-packages/nuclia/lib/nua.py:437: ValidationError
Loading