Module livekit.plugins.mistralai.tools

Classes

class CodeInterpreter
Expand source code
@dataclass
class CodeInterpreter(MistralTool):
    """Enable the code interpreter tool to write and execute Python code."""

    def __post_init__(self) -> None:
        super().__init__(id="mistral_code_interpreter")

    def to_dict(self) -> dict[str, Any]:
        return {"type": "code_interpreter"}

Enable the code interpreter tool to write and execute Python code.

Ancestors

  • MistralTool
  • livekit.agents.llm.tool_context.ProviderTool
  • livekit.agents.llm.tool_context.Tool
  • abc.ABC

Methods

def to_dict(self) ‑> dict[str, typing.Any]
Expand source code
def to_dict(self) -> dict[str, Any]:
    return {"type": "code_interpreter"}
class DocumentLibrary (library_ids: list[str])
Expand source code
@dataclass
class DocumentLibrary(MistralTool):
    """Enable document library tool to search uploaded document collections."""

    library_ids: list[str]

    def __post_init__(self) -> None:
        super().__init__(id="mistral_document_library")

    def to_dict(self) -> dict[str, Any]:
        return {"type": "document_library", "library_ids": self.library_ids}

Enable document library tool to search uploaded document collections.

Ancestors

  • MistralTool
  • livekit.agents.llm.tool_context.ProviderTool
  • livekit.agents.llm.tool_context.Tool
  • abc.ABC

Instance variables

var library_ids : list[str]

Methods

def to_dict(self) ‑> dict[str, typing.Any]
Expand source code
def to_dict(self) -> dict[str, Any]:
    return {"type": "document_library", "library_ids": self.library_ids}
class MistralTool (*, id: str)
Expand source code
class MistralTool(ProviderTool, ABC):
    @abstractmethod
    def to_dict(self) -> dict[str, Any]: ...

Helper class that provides a standard way to create an ABC using inheritance.

Ancestors

  • livekit.agents.llm.tool_context.ProviderTool
  • livekit.agents.llm.tool_context.Tool
  • abc.ABC

Subclasses

Methods

def to_dict(self) ‑> dict[str, typing.Any]
Expand source code
@abstractmethod
def to_dict(self) -> dict[str, Any]: ...
class WebSearch
Expand source code
@dataclass
class WebSearch(MistralTool):
    """Enable web search tool to access up-to-date information from the internet."""

    def __post_init__(self) -> None:
        super().__init__(id="mistral_web_search")

    def to_dict(self) -> dict[str, Any]:
        return {"type": "web_search"}

Enable web search tool to access up-to-date information from the internet.

Ancestors

  • MistralTool
  • livekit.agents.llm.tool_context.ProviderTool
  • livekit.agents.llm.tool_context.Tool
  • abc.ABC

Methods

def to_dict(self) ‑> dict[str, typing.Any]
Expand source code
def to_dict(self) -> dict[str, Any]:
    return {"type": "web_search"}