Chat Completions
Basic Usage
Simple Text Input
string response = await "Hello, AI!"
.GENCompletion()
.ExecuteAsync();With Model Selection
string response = await "Explain photosynthesis"
.GENCompletion()
.SetModel(OpenAIModel.GPT4o)
.ExecuteAsync();Input Types
1. String Input
2. Message Input
3. Prompt Input
Configuration
Temperature
Max Tokens
System Message
Top P (Nucleus Sampling)
Frequency Penalty
Presence Penalty
Multi-Turn Conversations
Streaming
Provider Support
Provider
Support
Models
Examples
Example 1: Chatbot Response
Example 2: FAQ System
Example 3: Contextual Help
Example 4: Translation
Error Handling
Best Practices
✅ Do
❌ Don't
Next Steps
Last updated