Skip to main content
AI responses are the core functionality of the Sudo platform, allowing you to generate chat completions from a wide variety of models including GPT, Claude, Gemini, and more.

Basic Usage

Simple AI Response

TypeScript

Conversation with System Message

TypeScript

Multi-turn Conversation

TypeScript

Parameters and Configuration

Temperature and Randomness

TypeScript

Token Limits

TypeScript

Frequency and Presence Penalties

TypeScript

Stop Sequences

TypeScript

Response Format Options

Multiple Choices

TypeScript

Log Probabilities

TypeScript

Metadata and Storage

Adding Metadata

TypeScript

Async Usage

Basic Async

TypeScript

Concurrent Requests

TypeScript

Error Handling

TypeScript

Advanced Examples

Chat Bot with Context Management

TypeScript

Next Steps

Now that you understand AI responses:
  1. Explore Streaming - Add real-time streaming responses
  2. Try Tool Calling - Enable function calling capabilities
  3. Structured Output - Generate JSON and structured data
  4. Image Input - Work with multimodal inputs
Start with simple use cases and gradually add complexity. Use appropriate models for your needs - faster models for simple tasks, more capable models for complex reasoning. Both Python and TypeScript SDKs offer the same powerful capabilities with language-specific optimizations.