Skip to content

Nebius

NebiusMultiModal #

Bases: OpenAIMultiModal

Nebius AI Studio Multimodal class.

Source code in llama-index-integrations/multi_modal_llms/llama-index-multi-modal-llms-nebius/llama_index/multi_modal_llms/nebius/base.py
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
class NebiusMultiModal(OpenAIMultiModal):
    """
    Nebius AI Studio Multimodal class.
    """

    def __init__(
        self,
        model: str,
        api_key: Optional[str] = None,
        api_base: str = DEFAULT_API_BASE,
        **kwargs: Any,
    ) -> None:
        api_key = api_key or os.environ.get("NEBIUS_API_KEY", None)
        super().__init__(
            model=model,
            api_key=api_key,
            api_base=api_base,
            **kwargs,
        )

    @classmethod
    def class_name(cls) -> str:
        """Get class name."""
        return "nebius_multi_modal_llm"

    def _get_model_kwargs(self, **kwargs: Any) -> dict[str, Any]:
        base_kwargs = {"model": self.model, "temperature": self.temperature, **kwargs}
        if self.max_new_tokens is not None:
            base_kwargs["max_tokens"] = self.max_new_tokens
        return {**base_kwargs, **self.additional_kwargs}

class_name classmethod #

class_name() -> str

Get class name.

Source code in llama-index-integrations/multi_modal_llms/llama-index-multi-modal-llms-nebius/llama_index/multi_modal_llms/nebius/base.py
30
31
32
33
@classmethod
def class_name(cls) -> str:
    """Get class name."""
    return "nebius_multi_modal_llm"