)
mosaic_llm = MosaicML(
    endpoint_url=endpoint_url,
    mosaicml_api_token="my-api-key"
)
Validators
raise_deprecation » all fields
set_verbose » verbose
validate_environment » all fields
field endpoint_url: str = 'https://models.hosted-on.mosaicml.hosting/mpt-7b-instruct/v1/predict'#
Endpoint URL to use.
field inject_instruction_format: bool = False#
Whether to inject the instruction format into the prompt.
field model_kwargs: Optional[dict] = None#
Key word arguments to pass to the model.
field retry_sleep: float = 1.0#
How long to try sleeping for if a rate limit is encountered
field tags: Optional[List[str]] = None#
Tags to add to the run trace.
field verbose: bool [Optional]#
Whether to print out response text.
__call__(prompt: str, stop: Optional[List[str]] = None, callbacks: Optional[Union[List[langchain.callbacks.base.BaseCallbackHandler], langchain.callbacks.base.BaseCallbackManager]] = None, **kwargs: Any) → str#
Check Cache and run the LLM on the given prompt and input.
async agenerate(prompts: List[str], stop: Optional[List[str]] = None, callbacks: Optional[Union[List[langchain.callbacks.base.BaseCallbackHandler], langchain.callbacks.base.BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, **kwargs: Any) → langchain.schema.LLMResult#
Run the LLM on the given prompt and input.
rtdocs_stable/api.python.langchain.com/en/stable/reference/modules/llms.html