-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API Key error #172
Comments
Same here
This works perfectly, but when try to set that azue_chatgpt to a agent I got the same error
|
Hello! I don't know if anyone was able to figure out how to connect with CrewAI agents and tools for current versions, like 0.7 and above. I saw that Azure only works for CrewAI 0.11. |
from crewai import LLM os.environ["OTEL_SDK_DISABLED"] = "true" without setting the "OTEL_SDK_DISABLED" to true I was getting the below error
config = configparser.ConfigParser() OpenAI35kTurbo = LLM( Your base_url will be https://${INSTANCE_NAME}.openai.azure.com. Basically it is expecting an endpoint for base_url parameter. This works perfectly well for me. Please notice azure in model=f"azure/{config["AZURE_OPEN_AI"]["DEPLOYMENT_NAME"]}". That is important. |
This below worked for me as well. latest crew-ai doesn't have correct details for the setup, the below setup works for me.
|
I am encountering the same error. I am trying to use Google Gemini, and the above methods do not work for me. I would appreciate any help. Thanks! |
Can you post your error message, Along with your setup. It will help looking into the issue. |
Sure, LLM: Agent:
Output when the above runs: Checking env var OPENAI_API_KEY: None ... code continues ...
|
I would request you to try the below code # Imports LLM class from crewai
from crewai import LLM, Agent
# LLM Object from crewai package
llm = LLM(mode="gemini-1.5-flash",api_key=GEM_API)
# create your agent
agent1 = Agent(
role="Communication Analyst",
goal="Understand the definitions of the classes provided and make a rational decision on how to classify any conversation segment into classes",
backstory=AGENT1_BACKSTORY,
llm=llm,
api_key=GEM_API
) |
litellm.exceptions.AuthenticationError: litellm.AuthenticationError: AuthenticationError: OpenAIException - The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable
The text was updated successfully, but these errors were encountered: