# /config.py """ Centralized configuration for the AnyCoder application. """ from typing import List, Dict, Union # --- System Prompts --- (No changes needed) HTML_SYSTEM_PROMPT = """...""" GENERIC_SYSTEM_PROMPT = """...""" HTML_SYSTEM_PROMPT_WITH_SEARCH = """...""" GENERIC_SYSTEM_PROMPT_WITH_SEARCH = """...""" FOLLOW_UP_SYSTEM_PROMPT = """...""" # --- Search/Replace Constants --- (No changes needed) SEARCH_START = "<<<<<<< SEARCH" DIVIDER = "=======" REPLACE_END = ">>>>>>> REPLACE" # --- Models & UI --- AVAILABLE_MODELS: List[Dict[str, str]] = [ # --- OpenAI Models --- {"name": "OpenAI GPT-4o", "id": "openai/gpt-4o"}, {"name": "OpenAI GPT-4 Turbo", "id": "openai/gpt-4-turbo"}, # --- Groq Models (Fastest) --- {"name": "Groq Llama3 70b", "id": "groq/llama3-70b-8192"}, {"name": "Groq Llama3 8b", "id": "groq/llama3-8b-8192"}, {"name": "Groq Mixtral 8x7b", "id": "groq/mixtral-8x7b-32768"}, # --- Google Gemini Models --- {"name": "Google Gemini 1.5 Pro", "id": "gemini/gemini-1.5-pro-latest"}, # --- DeepSeek Models (Direct API) --- {"name": "DeepSeek Coder V2", "id": "deepseek/deepseek-coder-v2-instruct"}, {"name": "DeepSeek Chat V2", "id": "deepseek/deepseek-chat"}, # --- Fireworks AI Models --- {"name": "Fireworks Firefunction V1", "id": "fireworks/accounts/fireworks/models/firefunction-v1"}, # --- Hugging Face Multimodal Models --- {"name": "HuggingFace ERNIE-VL", "id": "huggingface/baidu/ERNIE-4.5-VL-424B-A47B-Base-PT"}, {"name": "HuggingFace GLM-VL", "id": "huggingface/THUDM/GLM-4.1V-9B-Thinking"}, ] MULTIMODAL_MODELS: List[str] = [ "huggingface/baidu/ERNIE-4.5-VL-424B-A47B-Base-PT", "huggingface/THUDM/GLM-4.1V-9B-Thinking", ] # (DEMO_LIST and GRADIO_SUPPORTED_LANGUAGES remain the same) DEMO_LIST: List[Dict[str, str]] = [ {"title": "Todo App", "description": "Create a simple todo application with add, delete, and mark as complete functionality"}, {"title": "Calculator", "description": "Build a basic calculator with standard arithmetic operations"}, {"title": "Chat Interface", "description": "Build a chat interface with message history and user input"}, {"title": "E-commerce Product Card", "description": "Create a responsive product card for an e-commerce website"}, {"title": "Login Form", "description": "Build a modern, responsive login form with validation"}, {"title": "Dashboard Layout", "description": "Create a dashboard layout with a sidebar and main content area"}, {"title": "UI from Image", "description": "Upload an image of a UI design and I'll generate the HTML/CSS code for it"}, {"title": "Website Redesign", "description": "Enter a website URL to extract its content and redesign it"}, {"title": "Modify HTML", "description": "After generating HTML, ask me to modify it with specific changes. For example: 'Change the title to My New App'"}, ] # --- Supported Languages for Gradio Syntax Highlighting --- # From: https://www.gradio.app/docs/code GRADIO_SUPPORTED_LANGUAGES: List[Union[str, None]] = [ "python", "c", "cpp", "markdown", "latex", "json", "html", "css", "javascript", "jinja2", "typescript", "yaml", "dockerfile", "shell", "r", "sql", "sql-msSQL", "sql-mySQL", "sql-mariaDB", "sql-sqlite", "sql-cassandra", "sql-plSQL", "sql-hive", "sql-pgSQL", "sql-gql", "sql-gpSQL", "sql-sparkSQL", "sql-esper", None ]