MCPcopy Create free account
hub / github.com/Paper2Poster/Paper2Poster / __init__

Method __init__

camel/models/nvidia_model.py:56–78  ·  view source on GitHub ↗
(
        self,
        model_type: Union[ModelType, str],
        model_config_dict: Optional[Dict[str, Any]] = None,
        api_key: Optional[str] = None,
        url: Optional[str] = None,
        token_counter: Optional[BaseTokenCounter] = None,
    )

Source from the content-addressed store, hash-verified

54 ]
55 )
56 def __init__(
57 self,
58 model_type: Union[ModelType, str],
59 model_config_dict: Optional[Dict[str, Any]] = None,
60 api_key: Optional[str] = None,
61 url: Optional[str] = None,
62 token_counter: Optional[BaseTokenCounter] = None,
63 ) -> None:
64 if model_config_dict is None:
65 model_config_dict = NvidiaConfig().as_dict()
66 api_key = api_key or os.environ.get("NVIDIA_API_KEY")
67 url = url or os.environ.get(
68 "NVIDIA_API_BASE_URL", "https://integrate.api.nvidia.com/v1"
69 )
70 super().__init__(
71 model_type, model_config_dict, api_key, url, token_counter
72 )
73 self._client = OpenAI(
74 timeout=180,
75 max_retries=3,
76 api_key=self._api_key,
77 base_url=self._url,
78 )
79
80 def run(
81 self,

Callers

nothing calls this directly

Calls 2

NvidiaConfigClass · 0.90
as_dictMethod · 0.45

Tested by

no test coverage detected