mberman84 / crewai_yt

73 stars 39 forks source link

how i use this with ollama locally? i have this list ready to go #3

Open jamieduk opened 5 months ago

jamieduk commented 5 months ago

how i use this with ollama locally? i have this list ready to go ollama list NAME ID SIZE MODIFIED
hub/stewart/multi-agent:latest 8cc6e95685ac 3.8 GB 10 days ago codellama:7b-code fc84f39375bc 3.8 GB 4 days ago
dolphin-phi:latest c5761fc77240 1.6 GB 10 days ago llama2:latest 78e26419b446 3.8 GB 10 days ago llava:7b 8dd30f6b0cb1 4.7 GB 9 days ago
openchat:7b-v3.5-0106-q5_K_S 6ed7bb1af154 5.0 GB 9 days ago
orca-mini:3b-q8_0 e31654abca22 3.6 GB 10 days ago

gonzalovsilva commented 5 months ago

how i use this with ollama locally? i have this list ready to go ollama list NAME ID SIZE MODIFIED hub/stewart/multi-agent:latest 8cc6e95685ac 3.8 GB 10 days ago codellama:7b-code fc84f39375bc 3.8 GB 4 days ago dolphin-phi:latest c5761fc77240 1.6 GB 10 days ago llama2:latest 78e26419b446 3.8 GB 10 days ago llava:7b 8dd30f6b0cb1 4.7 GB 9 days ago openchat:7b-v3.5-0106-q5_K_S 6ed7bb1af154 5.0 GB 9 days ago orca-mini:3b-q8_0 e31654abca22 3.6 GB 10 days ago

pip install langchain-community # install langchain
from langchain_community.llms import Ollama
...
ollama_llm = Ollama(
    model="codellama", # for example
    temperature=0
)
...
summarizer = Agent(
    role="summarizer of websites",
    goal="....",
    backstory="...",
    llm=ollama_llm, # the important part
    ...
)