prompt: str,
        stop: Optional[List[str]] = None,
        run_manager: Optional[CallbackManagerForLLMRun] = None,
        **kwargs: Any,
    ) -> str:
        """Call out to Aviary
        Args:
            prompt: The prompt to pass into the model.
        Returns:
            The string generated by the model.
        Example:
            .. code-block:: python
                response = aviary("Tell me a joke.")
        """
        url = self.aviary_url + "query/" + self.model.replace("/", "--")
        response = requests.post(
            url,
            headers=self.headers,
            json={"prompt": prompt},
            timeout=TIMEOUT,
        )
        try:
            text = response.json()[self.model]["generated_text"]
        except requests.JSONDecodeError as e:
            raise ValueError(
                f"Error decoding JSON from {url}. Text response: {response.text}",
            ) from e
        if stop:
            text = enforce_stop_tokens(text, stop)
        return text
By Harrison Chase
    
      © Copyright 2023, Harrison Chase.
      
  Last updated on Jun 16, 2023.
rtdocs_stable/api.python.langchain.com/en/stable/_modules/langchain/llms/aviary.html