Generation Commands

Commands used to generating images using the Lillo Ai Framework.

Command Usage

/img Command

export const imgCommand: CommandHandler = {
  name: 'img',
  description: 'Generate an image using DALL-E'
};

Usage Examples

/img A cute cat playing with a ball of yarn
/img A futuristic cityscape at sunset
/img An abstract painting of emotions

Parameters

  • prompt: Image description (3-1000 characters)

  • Optional style enhancements automatically applied

Response

  • Processing message

  • Generated image

  • AI-generated caption

  • Error message (if applicable)

Function Calling

Natural Language Triggers

  • "Generate an image of..."

  • "Create a picture showing..."

  • "Show me an illustration of..."

  • "Make an image depicting..."

Implementation

Command Handler

Validation

Processing

Response Handling

Error Handling

User Errors

  • Empty prompt

  • Prompt too short/long

  • Content policy violations

  • Rate limiting

System Errors

  • API failures

  • Storage errors

  • Network issues

  • Buffer handling

Error Messages

Best Practices

Prompt Writing

  • Be specific and detailed

  • Avoid prohibited content

  • Use clear descriptions

  • Consider style elements

Command Usage

  • Respect rate limits

  • Check error messages

  • Verify image generation

  • Monitor response time

Function Integration

  • Handle all error cases

  • Implement timeouts

  • Verify storage

  • Track metrics

Last updated