Skip to content
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

[BUG] - Problems with azure template #1981

Open
antoniocncj opened this issue Jan 27, 2025 · 0 comments
Open

[BUG] - Problems with azure template #1981

antoniocncj opened this issue Jan 27, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@antoniocncj
Copy link

Description

Exception
crewai Error instantiating LLM from environment/fallback: TypeError: LLM.init() got an unexpected keyword argument 'api_base'

Steps to Reproduce

  1. got to crew cli
  2. create a new crew : crewai create crew crew-with-azure
  3. choose Azure option
  4. fill all fields
  5. set up . env file with azure openai info (credential, api version and so on)
  6. execute the application: crew run

Expected behavior

The application should generate the a report.md as output from Azure AI.

Screenshots/Code snippets

n/a

Operating System

Windows 11

Python Version

3.12

crewAI Version

0.98.0

crewAI Tools Version

0.32.0

Virtual Environment

Venv

Evidence

Image

Possible Solution

change the mechanism of the sdk to consider set the api base in according with AZURE_API_BASE attribute (azure_openai.py)

Additional context

Workaround to solve it

Override the key name dynamically

for entry in ENV_VARS.get("azure", []):
if entry.get("key_name") == "AZURE_API_BASE":
entry["BASE_URL"] = entry.pop("key_name") # Rename the key

or

chave the env file to consider BASE_URL insted of AZURE_API_BASE

@antoniocncj antoniocncj added the bug Something isn't working label Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant