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.
17 lines
426 B
17 lines
426 B
5 months ago
|
from swarms import OpenAIChat
|
||
|
import os
|
||
|
|
||
|
# Get the OpenAI API key from the environment variable
|
||
|
api_key = os.getenv("OPENAI_API_KEY")
|
||
|
|
||
|
# Create an instance of the OpenAIChat class
|
||
|
model = OpenAIChat(api_key=api_key, model_name="gpt-4o-mini")
|
||
|
|
||
|
# Query the model with a question
|
||
|
out = model(
|
||
|
"What is the best state to register a business in the US for the least amount of taxes?"
|
||
|
)
|
||
|
|
||
|
# Print the model's response
|
||
|
print(out)
|