vision_agent.lmm
vision_agent.lmm.OpenAILMM
OpenAILMM(
model_name="gpt-4o-2024-05-13",
api_key=None,
max_tokens=4096,
json_mode=False,
**kwargs
)
Bases: LMM
An LMM class for the OpenAI LMMs.
Source code in vision_agent/lmm/lmm.py
chat
Chat with the LMM model.
PARAMETER | DESCRIPTION |
---|---|
chat |
A list of dictionaries containing the chat messages. The messages can be in the format: [{"role": "user", "content": "Hello!"}, ...] or if it contains media, it should be in the format: [{"role": "user", "content": "Hello!", "media": ["image1.jpg", ...]}, ...]
TYPE:
|
Source code in vision_agent/lmm/lmm.py
generate
Source code in vision_agent/lmm/lmm.py
vision_agent.lmm.AzureOpenAILMM
AzureOpenAILMM(
model_name=None,
api_key=None,
api_version="2024-02-01",
azure_endpoint=None,
max_tokens=4096,
json_mode=False,
**kwargs
)
Bases: OpenAILMM
Source code in vision_agent/lmm/lmm.py
client
instance-attribute
generate
Source code in vision_agent/lmm/lmm.py
chat
Chat with the LMM model.
PARAMETER | DESCRIPTION |
---|---|
chat |
A list of dictionaries containing the chat messages. The messages can be in the format: [{"role": "user", "content": "Hello!"}, ...] or if it contains media, it should be in the format: [{"role": "user", "content": "Hello!", "media": ["image1.jpg", ...]}, ...]
TYPE:
|
Source code in vision_agent/lmm/lmm.py
vision_agent.lmm.OllamaLMM
OllamaLMM(
model_name="llava",
base_url="http://localhost:11434/api",
json_mode=False,
num_ctx=128000,
**kwargs
)
Bases: LMM
An LMM class for the ollama.
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
PARAMETER | DESCRIPTION |
---|---|
model_name |
The ollama name of the model.
TYPE:
|
base_url |
The base URL of the Ollama API.
TYPE:
|
json_mode |
Whether to use JSON mode.
TYPE:
|
num_ctx |
The context length for the model.
TYPE:
|
kwargs |
Additional options to pass to the model.
TYPE:
|
Source code in vision_agent/lmm/lmm.py
chat
Chat with the LMM model.
PARAMETER | DESCRIPTION |
---|---|
chat |
A list of dictionaries containing the chat messages. The messages can be in the format: [{"role": "user", "content": "Hello!"}, ...] or if it contains media, it should be in the format: [{"role": "user", "content": "Hello!", "media": ["image1.jpg", ...]}, ...]
TYPE:
|
Source code in vision_agent/lmm/lmm.py
generate
Source code in vision_agent/lmm/lmm.py
vision_agent.lmm.AnthropicLMM
Bases: LMM
An LMM class for Anthropic's LMMs.