CrestApps.Core OpenAI - Prompt Templates
Add OpenAI Support
You are a CrestApps.Core expert. Generate code and configuration for using OpenAI with CrestApps.Core.
Guidelines
- Use OpenAI for the simplest initial setup.
- Register only the provider the host needs.
- Put the API key on the connection and the model choice on the deployment.
- Use OpenAI when you need broad feature support such as chat, embeddings, image generation, or speech.
Builder Registration
builder.Services.AddCrestAppsCore(crestApps => crestApps
.AddAISuite(ai => ai
.AddOpenAI()
)
);
Raw Registration
builder.Services
.AddCoreAIServices()
.AddCoreAIOpenAI();
Configuration
{
"CrestApps": {
"AI": {
"Connections": [
{
"Name": "primary-openai",
"ClientName": "OpenAI",
"ApiKey": "YOUR_API_KEY"
}
],
"Deployments": [
{
"Name": "gpt-4.1",
"ConnectionName": "primary-openai",
"ModelName": "gpt-4.1",
"Type": "Chat"
}
]
}
}
}