You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
594 B
22 lines
594 B
11 months ago
|
import os
|
||
|
from swarms import AzureOpenAI
|
||
|
|
||
|
# 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 markdwon format."
|
||
|
)
|
||
|
|
||
|
# Generate a response
|
||
|
response = model(prompt)
|
||
|
print(response)
|