From c14f14797ba7e82cead3378eaa95b1b5f5750274 Mon Sep 17 00:00:00 2001 From: Dillon Laird Date: Tue, 27 Aug 2024 14:03:13 -0700 Subject: [PATCH] more docs for ollama --- vision_agent/lmm/lmm.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/vision_agent/lmm/lmm.py b/vision_agent/lmm/lmm.py index 32048d66..e78a0593 100644 --- a/vision_agent/lmm/lmm.py +++ b/vision_agent/lmm/lmm.py @@ -333,6 +333,18 @@ def __init__( num_ctx: int = 128_000, **kwargs: Any, ): + """Initializes the Ollama LMM. kwargs are passed as 'options' to the model. + More information on options can be found here + https://github.com/ollama/ollama/blob/main/docs/modelfile.md#valid-parameters-and-values + + Parameters: + model_name (str): The ollama name of the model. + base_url (str): The base URL of the Ollama API. + json_mode (bool): Whether to use JSON mode. + num_ctx (int): The context length for the model. + kwargs (Any): Additional options to pass to the model. + """ + self.url = base_url self.model_name = model_name self.kwargs = {"options": kwargs}