"top_k": self.top_k,
                "top_p": self.top_p,
            },
        }
    model_kwargs: Optional[dict] = None
    """Other model keyword args"""
    @property
    def _identifying_params(self) -> Mapping[str, Any]:
        """Get the identifying parameters."""
        return {**{"model": self.model}, **self._default_params}
    class Config:
        """Configuration for this pydantic object."""
        extra = Extra.forbid
    def _process_emb_response(self, input: str) -> List[float]:
        """Process a response from the API.
        Args:
            response: The response from the API.
        Returns:
            The response as a dictionary.
        """
        headers = {
            "Content-Type": "application/json",
        }
        try:
            res = requests.post(
                f"{self.base_url}/api/embeddings",
                headers=headers,
                json={"model": self.model, "prompt": input, **self._default_params},
            )
        except requests.exceptions.RequestException as e:
            raise ValueError(f"Error raised by inference endpoint: {e}")
        if res.status_code != 200:
            raise ValueError(
                "Error raised by inference API HTTP code: %s, %s"
                % (res.status_code, res.text)
            )
        try:
            t = res.json()
            return t["embedding"]
        except requests.exceptions.JSONDecodeError as e:
            raise ValueError(
                f"Error raised by inference API: {e}.\nResponse: {res.text}"
            )
    def _embed(self, input: List[str]) -> List[List[float]]:
        embeddings_list: List[List[float]] = []