@Michal-Mikolas, thank you for your patience.
Here’s a working version of your initial example.
from crewai import Agent, Task, Crew, LLM
llm=LLM(
model="groq/llama-3.3-70b-versatile",
api_key=GROQ_API_KEY,
)
translator = Agent(
role='Translator',
goal="To translate given {word} from English to French.",
backstory=(
"You are professional translator. You can translate from English to French and vice versa."
),
llm=llm,
verbose=True,
)
translate = Task(
description="Translate given word from English to French.",
agent=translator,
expected_output='translated word',
)
crew = Crew(
agents=[translator],
tasks=[translate],
verbose=True,
)
result = crew.kickoff(inputs={'word': 'programming'}) # translate word "programming" to French
print(result)
The key is to pass the input varibale to the agent as well: {word}. Also, you don’t need to use langchain_groq package anymore since it’s built in with LiteLLM now.