Skip to content

Commit

Permalink
use llama3.1 for ollamavisionagentcoder
Browse files Browse the repository at this point in the history
  • Loading branch information
dillonalaird committed Aug 26, 2024
1 parent c9ea03f commit 2eed7e8
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions vision_agent/agent/vision_agent_coder.py
Original file line number Diff line number Diff line change
Expand Up @@ -845,9 +845,12 @@ class OllamaVisionAgentCoder(VisionAgentCoder):
"""VisionAgentCoder that uses Ollama models for planning, coding, testing.
Pre-requisites:
1. Run ollama pull llava for the LMM (or any other LMM model that can consume images)
1. Run ollama pull llama3.1 for the LLM
2. Run ollama pull mxbai-embed-large for the embedding similarity model
Technically you should use a VLM such as llava but llava is not able to handle the
context length and crashes.
Example
-------
>>> image vision_agent as va
Expand All @@ -867,14 +870,22 @@ def __init__(
) -> None:
super().__init__(
planner=(
OllamaLMM(temperature=0.0, json_mode=True)
OllamaLMM(model_name="llama3.1", temperature=0.0, json_mode=True)
if planner is None
else planner
),
coder=OllamaLMM(temperature=0.0) if coder is None else coder,
tester=OllamaLMM(temperature=0.0) if tester is None else tester,
coder=(
OllamaLMM(model_name="llama3.1", temperature=0.0)
if coder is None
else coder
),
tester=(
OllamaLMM(model_name="llama3.1", temperature=0.0)
if tester is None
else tester
),
debugger=(
OllamaLMM(temperature=0.0, json_mode=True)
OllamaLMM(model_name="llama3.1", temperature=0.0, json_mode=True)
if debugger is None
else debugger
),
Expand Down

0 comments on commit 2eed7e8

Please sign in to comment.