File tree Expand file tree Collapse file tree
packages/nvidia_nat_core/tests/nat/llm Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818from unittest .mock import MagicMock
1919from unittest .mock import patch
2020
21+ import pytest
22+
2123from nat .builder .llm import LLMProviderInfo
2224from nat .llm .oci_llm import OCIModelConfig
2325from nat .llm .oci_llm import oci_llm
2426
2527
28+ @pytest .fixture (name = "mock_builder" )
29+ def fixture_mock_builder ():
30+ """Create a mock builder."""
31+ return MagicMock ()
32+
33+
2634def test_oci_model_config_defaults ():
2735 config = OCIModelConfig (model_name = "nvidia/Llama-3.1-Nemotron-Nano-8B-v1" )
2836
@@ -41,6 +49,7 @@ def test_oci_model_config_accepts_endpoint_aliases():
4149 assert config .endpoint == "https://inference.generativeai.us-chicago-1.oci.oraclecloud.com"
4250
4351
52+ @pytest .mark .asyncio
4453async def test_oci_llm_provider_yields_provider_info (mock_builder ):
4554 config = OCIModelConfig (
4655 model_name = "nvidia/Llama-3.1-Nemotron-Nano-8B-v1" ,
You can’t perform that action at this time.
0 commit comments