screenshot-to-code icon indicating copy to clipboard operation
screenshot-to-code copied to clipboard

xAi (grok-2-vision-1212) added to llm list

Open mirzaaghazadeh opened this issue 9 months ago • 3 comments

I added xAi and model grok-2-vision-1212 for generate code with that

mirzaaghazadeh avatar Feb 24 '25 11:02 mirzaaghazadeh

Thank you - how are the results?

And is Grok 3 not available via API yet?

abi avatar Feb 24 '25 18:02 abi

Thank you - how are the results? And is Grok 3 not available via API yet?

I liked the results , they are good

It will release soon (read about it) , But we need to see first grok 3 version will have vision or not , for now I think grok-2-vision-1212 is very good !

Its better to have xAi from now on this project when grok3 will come it will be very better !

mirzaaghazadeh avatar Feb 24 '25 20:02 mirzaaghazadeh

Add X.AI (Grok) Integration

Overview

This PR adds support for X.AI's Grok-2 Vision model as a new provider option in the screenshot-to-code tool. The integration includes optimized image handling and proper error management for Grok's API requirements.

Changes

  • Added Grok-2 Vision model support with X.AI API integration
  • Implemented provider-based configuration system:
    • PROVIDER=xai for X.AI/Grok
    • PROVIDER=anthropic for Claude
    • PROVIDER=openai for GPT-4 Vision
  • Enhanced image processing with configurable size limits
  • Added aggressive image compression (512KB limit) for Grok compatibility
  • Updated documentation with provider setup instructions
  • Added Contributors section in README

Documentation

  • Added Grok-2 Vision to supported models list
  • Added provider configuration instructions
  • Updated environment variable setup guide
  • Added Contributors section

Dependencies

  • Uses Anthropic SDK with custom base URL for X.AI API
  • No new dependencies required

Additional Notes

Model configured: grok-2-vision-1212

mirzaaghazadeh avatar Feb 24 '25 20:02 mirzaaghazadeh