# This file was generated by liblab | https://liblab.com/

from __future__ import annotations
from .base import BaseModel
from enum import Enum
from typing import TYPE_CHECKING

if TYPE_CHECKING:
    from .OpenAiFunctionDefinition import OpenAiFunctionDefinition


class Type_(Enum):
    FUNCTION = "function"

    def list():
        return list(map(lambda x: x.value, Type_._member_map_.values()))


class OpenAiTools(BaseModel):
    """
    OpenAI Tools
    """

    def __init__(self, type: Type_, function: OpenAiFunctionDefinition, **kwargs):
        """
        Initialize OpenAiTools
        Parameters:
        ----------
            type: str
            function: OpenAiFunctionDefinition
        """
        self.type = self._enum_matching(type, Type_.list(), "type")
        self.function = function
