Closed techthiyanes closed 1 month ago
Hello there, thank you for opening an Issue ! 🙏🏻 The team was notified and they will get back to you asap.
@techthiyanes try the swarm_models package. all of the models have been moved here
$ pip3 install -U swarm_models
import os
from dotenv import load_dotenv
from swarms import AzureOpenAI
# Load the environment variables
load_dotenv()
# Create an instance of the AzureOpenAI class
model = AzureOpenAI(
azure_endpoint=os.getenv("AZURE_OPENAI_ENDPOINT"),
deployment_name=os.getenv("AZURE_OPENAI_DEPLOYMENT"),
openai_api_version=os.getenv("OPENAI_API_VERSION"),
openai_api_key=os.getenv("AZURE_OPENAI_API_KEY"),
azure_ad_token=os.getenv("AZURE_OPENAI_AD_TOKEN"),
)
# Define the prompt
prompt = (
"Analyze this load document and assess it for any risks and"
" create a table in markdown format."
)
# Generate a response
response = model(prompt)
print(response)
Thank you so much on your response. I am able to import it now.
Describe the bug Unable to import AzureOpenAI
To Reproduce Import AzureOpenAI from swarms
Expected behavior Should be able to import AzureOpenAI
Upvote & Fund