Closed ABR-X closed 2 days ago
Hi phi3 does work with ollama. You can set up a dummy key in the code or .env. If you have access to the crewai discord, there are some examples on there. Thanks
Hi phi3 does work with ollama. You can set up a dummy key in the code or .env. If you have access to the crewai discord, there are some examples on there. Thanks
@gadgethome Hi, thanks for your responce, I don't have access to the discord channel. I did create a .env file and set a dummy OPENAI_API_KEY key, but there is an issue:
Incorrect API key provided
You can do this in a few different ways. I'm using ollama but should work with lmstudio as well.
os.environ["OPENAI_API_BASE"]='http://localhost:11434/v1' os.environ["OPENAI_MODEL_NAME"]='openhermes' os.environ["OPENAI_API_KEY"]='ollama'
or
llm = ChatOpenAI( model="phi3",
api_key="ollama", # something random
temperature=0,
)
Hi, I tried this as well, but it shows this error:
{'error': {'message': "model 'gpt-4' not found, try pulling it first", 'type': 'api_error', 'param': None, 'code': None}}
I don't know why it is still calling the OPENAI model! because I did specify that I want to use Phi3 model. when I create agents I don't find this problem:
agent= Agent(
role='Maths Specialist',
goal='Perform multiplication and addition operations on numbers',
llm=ChatOllama(model="phi3"),
tools=Math_tools.tools(), # array with tools
backstory="""As a Math Expert, your mission is to provide the result of
multiplication and addition operations. The results that you
provide will help resolving math problems accurately.""",
verbose=True
)
The issue occurs only when I try to define the manager_llm when creating a Crew.
You can do this in a few different ways. I'm using ollama but should work with lmstudio as well.
os.environ["OPENAI_API_BASE"]='http://localhost:11434/v1' os.environ["OPENAI_MODEL_NAME"]='openhermes' os.environ["OPENAI_API_KEY"]='ollama'
or
llm = ChatOpenAI( model="phi3", #base_url="http://localhost:11434/v1", api_key="ollama", # something random temperature=0, )
THANKS FOR THIS It got me out of the weeds.
Cheers!
This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
This issue was closed because it has been stalled for 5 days with no activity.
Hi, I want to use Phi3 model with the Crew, but it requires an Open AI key.
The Error: