how to make v.0.14.3. suppor Mistral AI API ?
My crew was supported by Mistral AI API before at v0.55. However it doesn't work in v.0.14.3. Is there anything I missed ? thank you.
my snippet code :
from langchain_mistralai.chat_models import ChatMistralAI
mistral_api_key = os.environ.get("MISTRAL_API_KEY")
mistral_client = ChatMistralAI(api_key=mistral_api_key, model="mistral-small-latest" , temperature=0.8,top_p=0.1 , max_retries=3 , max_tokens=8191) #
from langchain_community.tools import DuckDuckGoSearchRun
search_tool = DuckDuckGoSearchRun()
researcher = Agent(
role='Researcher',
goal="Conduct quick internet research on a user-defined topic. Provide a report that includes all key findings, date of the information, and sources.",
backstory="""You are an AI researcher base on trusted source and fact.""",
verbose=True,
allow_delegation=False,
tools=[search_tool],
llm=mistral_client
)
Entering new CrewAgentExecutor chain... 2024-02-27 11:50:28,171 - 15564 - chat_models.py-chat_models:293 - WARNING: Parameter
stopnot yet supported (https://docs.mistral.ai/api) 2024-02-27 11:50:36,996 - 15564 - chat_models.py-chat_models:293 - WARNING: Parameterstopnot yet supported (https://docs.mistral.ai/api) 2024-02-27 11:50:43,493 - 15564 - chat_models.py-chat_models:293 - WARNING: Parameterstopnot yet supported (https://docs.mistral.ai/api) 2024-02-27 11:50:52,336 - 15564 - chat_models.py-chat_models:293 - WARNING: Parameterstopnot yet supported (https://docs.mistral.ai/api) I tried to use a tool and give a final answer at the same time, I must choose only one.I tried to use a tool and give a final answer at the same time, I must choose only one.I tried to use a tool and give a final answer at the same time, I must choose only one.
It works for me 0.19.0. Just takes a little bit of time. Also the warnings are actually in Langchain's Mistral adapter, so nothing to be done about them. However, it works for me.
i tried to use my code for mistral api on 0.19.0 , the previous warning "WARNING: Parameter stop not yet supported (https://docs.mistral.ai/api)" was gone , however , it show : [DEBUG]: [Researcher] Task output: Agent stopped due to iteration limit or time limit.
stilling figuring out the solution.....
have the same issue with "Parameter stop not yet supported" warning even with crewai 0.19.0
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.