MCPcopy Create free account

hub / github.com/ResearAI/AutoFigure / functions

Functions374 in github.com/ResearAI/AutoFigure

↓ 86 callersFunction_log
Log with flush to ensure output in background threads.
backend/autofigure_routes.py:1029
↓ 37 callersFunctioncn
(...inputs: ClassValue[])
frontend/lib/utils.ts:5
↓ 27 callersFunctionget_session_lock
Get or create a lock for the session.
backend/autofigure_routes.py:192
↓ 10 callersFunctioncode_to_png
Converts code (SVG or mxGraph XML) to PNG based on output format. Args: code: The code to convert (SVG or mxGraph XML). outp
autofigure/generator.py:1332
↓ 10 callersFunctionuseAutoFigure
()
frontend/contexts/autofigure-context.tsx:465
↓ 7 callersFunctionextractPdfText
(file: File)
frontend/lib/pdf-utils.ts:47
↓ 7 callersFunctionisPdfFile
(file: File)
frontend/lib/pdf-utils.ts:59
↓ 6 callersFunctioncall_google_genai_multimodal
Legacy function name kept for compatibility. Routes to call_unified_llm using CONFIG settings.
autofigure/generator.py:237
↓ 6 callersFunctiongetAuthToken
()
frontend/contexts/autofigure-context.tsx:78
↓ 6 callersFunctiongetBackendUrl
()
frontend/contexts/autofigure-context.tsx:72
↓ 5 callersFunctionisTextFile
(file: File)
frontend/lib/pdf-utils.ts:66
↓ 5 callersFunctionparseIntSafe
* Safely parse integer from environment variable with validation
frontend/lib/ai-providers.ts:62
↓ 5 callersFunctionrequire_autofigure
Check if autofigure module is available.
backend/autofigure_routes.py:199
↓ 4 callersMethod_get_default_base_url
Get default base URL for a provider.
autofigure/config.py:96
↓ 4 callersFunction_get_mxgraphxml_placeholder_spec
Returns placeholder specification adapted for mxGraph XML format.
autofigure/generator.py:424
↓ 4 callersFunctionevaluate_code
Evaluation Agent: Evaluate code (SVG or mxGraph XML) quality, return score and critique Supports all topic types: paper, survey, blog, textbo
autofigure/generator.py:1437
↓ 4 callersFunctionextractDiagramXML
(xml_svg_string: string)
frontend/lib/utils.ts:673
↓ 4 callersFunctionformatXML
(xml: string, indent: string = " ")
frontend/lib/utils.ts:15
↓ 4 callersFunctionisLangfuseEnabled
()
frontend/lib/langfuse.ts:25
↓ 4 callersFunctionuseDiagram
()
frontend/contexts/diagram-context.tsx:274
↓ 3 callersMethod_build_enhancement_prompt
Build the enhancement prompt based on input type.
autofigure/enhancer.py:335
↓ 3 callersFunctioncall_google_genai_multimodal
Calls the Google GenAI multimodal API with intelligent retry logic. Args: contents: List of content including text and images.
autofigure/judge.py:68
↓ 3 callersFunctioncheckAllQuotaLimits
()
frontend/components/chat-panel.tsx:791
↓ 3 callersFunctionconvertPdfToMarkdown
(formData: FormData)
frontend/app/actions/pdf-actions.ts:18
↓ 3 callersFunctiongetMessageTextContent
(message: UIMessage)
frontend/components/chat-message-display.tsx:154
↓ 3 callersFunctiongetUserOriginalText
(message: UIMessage)
frontend/components/chat-message-display.tsx:163
↓ 3 callersFunctionsendChatMessage
( parts: any, xml: string, previousXml: string, sessionId: string, )
frontend/components/chat-panel.tsx:814
↓ 3 callersFunctionshowValidationErrors
(errors: string[])
frontend/components/chat-input.tsx:90
↓ 3 callersFunctionvalidateFiles
( newFiles: File[], existingCount: number, )
frontend/components/chat-input.tsx:52
↓ 3 callersFunctionvalidate_mxgraphxml_syntax
Validates mxGraph XML syntax for draw.io compatibility. Args: mxgraph_code: The mxGraph XML code to validate. Returns:
autofigure/generator.py:954
↓ 3 callersFunctionwrapWithMxFile
(xml: string)
frontend/lib/utils.ts:115
↓ 2 callersMethod_extract_image_from_openai_response
Extract image from OpenAI-compatible API response (BianXie/OpenRouter format).
autofigure/enhancer.py:852
↓ 2 callersMethod_get_content_type_context
Get evaluation context and criteria based on content type.
autofigure/judge.py:162
↓ 2 callersMethod_get_default_model
Get default model for a provider.
autofigure/config.py:105
↓ 2 callersMethod_list_images
List all image files in a folder.
autofigure/judge.py:519
↓ 2 callersFunction_save_base64_image_from_markdown
Extract and save base64 image from markdown format. Format: ![image](data:image/png;base64,<data>)
autofigure/enhancer.py:228
↓ 2 callersMethodcall
Call the LLM with text and optional images. Args: contents: List of content items (strings or PIL Images) te
autofigure/utils/llm_client.py:55
↓ 2 callersFunctioncall_unified_llm
Unified LLM call interface - supports multiple providers (bianxie, openrouter, gemini) IMPORTANT: This function MUST respect the provider pa
autofigure/generator.py:93
↓ 2 callersFunctioncharCountDict
* Create a character count dictionary from a string * Used for attribute-order agnostic comparison
frontend/lib/utils.ts:241
↓ 2 callersFunctioncleanupSnapshotsAfter
(messageIndex: number)
frontend/components/chat-panel.tsx:781
↓ 2 callersFunctioncopyMessageToClipboard
(messageId: string, text: string)
frontend/components/chat-message-display.tsx:213
↓ 2 callersFunctioncountTextTokens
(text: string)
frontend/lib/token-counter.ts:18
↓ 2 callersFunctioncreate_fallback_evaluation
(default_score: float = 5.0)
autofigure/generator.py:1353
↓ 2 callersMethodenhance
Enhance an image file using the configured provider. Args: input_path: Path to the input image (PNG) output_
autofigure/enhancer.py:267
↓ 2 callersMethodevaluate_figures_parallel
Evaluate multiple figures in parallel. Args: figure_paths: Dictionary of figure paths, format: {figure_id: file_path}.
autofigure/judge.py:411
↓ 2 callersFunctionfigure_generator_pipeline
Main pipeline for generating scientific figures (SVG or mxGraph XML format). Args: paper_path: Path to the content file. ref
autofigure/generator.py:1809
↓ 2 callersFunctionfindCachedResponse
( promptText: string, hasImage: boolean, )
frontend/lib/cached-responses.ts:911
↓ 2 callersFunctionformatNumber
(n: number)
frontend/components/quota-limit-toast.tsx:22
↓ 2 callersMethodgenerate
Generate a scientific figure from a text description. Args: description: Text description of the figure to generate
autofigure/agent.py:103
↓ 2 callersFunctiongenerate_initial_code
Generates initial diagram code (SVG or mxGraph XML) based on the output format. Args: paper_content: The content to visualize.
autofigure/generator.py:638
↓ 2 callersFunctiongetLangfuseClient
()
frontend/lib/langfuse.ts:8
↓ 2 callersFunctiongetPreviousXml
(beforeIndex: number)
frontend/components/chat-panel.tsx:765
↓ 2 callersFunctiongetStoredAccessCodeRequired
()
frontend/components/settings-dialog.tsx:42
↓ 2 callersFunctiongetTelemetryConfig
(params: { sessionId?: string userId?: string })
frontend/lib/langfuse.ts:79
↓ 2 callersFunctionget_file_extension
Get file extension (lowercase, without dot). Args: path: File path Returns: File extension (e.g., 'pdf', 'md')
autofigure/utils/file_utils.py:110
↓ 2 callersFunctionget_initial_prompt_template
(topic: str, content: str, output_format: str = None)
autofigure/generator.py:266
↓ 2 callersFunctionget_reference_figures_for_topic
Load reference figures for the specified topic. Currently only 'paper' topic has reference figures. Returns: List of PIL.Image o
backend/autofigure_routes.py:131
↓ 2 callersFunctionhandleModeChange
(mode: EnhancementMode)
frontend/components/autofigure/BeautificationDialog.tsx:36
↓ 2 callersFunctionimprove_code
Improvement Agent: Generate improved code (SVG or mxGraph XML) based on previous critique Use initial generation prompt + previous evaluation
autofigure/generator.py:1562
↓ 2 callersFunctionisValidFileType
(file: File)
frontend/components/chat-input.tsx:28
↓ 2 callersFunctionload_reference_figures
(figure_paths: List[str])
autofigure/generator.py:254
↓ 2 callersFunctionnormalizeWs
(s: string)
frontend/lib/utils.ts:483
↓ 2 callersFunctiononFetchChart
(saveToHistory = true)
frontend/components/chat-panel.tsx:110
↓ 2 callersFunctionparseStorageCount
(key: string)
frontend/lib/use-quota-manager.tsx:51
↓ 2 callersFunctionpreprocess_svg_for_cairo
(svg_code: str)
autofigure/generator.py:1073
↓ 2 callersFunctionprocessFilesAndAppendContent
( baseText: string, files: File[], pdfData: Map<File, FileData>, imageParts?:
frontend/components/chat-panel.tsx:848
↓ 2 callersFunctionrepair_code
Attempts to repair broken code based on output format. Args: code: The broken code (SVG or mxGraph XML). error_message: The
autofigure/generator.py:906
↓ 2 callersFunctionrepair_mxgraphxml
Attempts to repair broken mxGraph XML code. Args: mxgraph_code: The broken mxGraph XML code. error_message: The parsing erro
autofigure/generator.py:831
↓ 2 callersFunctionrepair_svg
Attempts to repair broken SVG code. Args: svg_code: The broken SVG code. error_message: The parsing error message.
autofigure/generator.py:759
↓ 2 callersFunctionrestoreDiagramFromSnapshot
(savedXml: string)
frontend/components/chat-panel.tsx:775
↓ 2 callersFunctionsave_iteration_results
Save iteration results to files. Args: iteration: The iteration number. code: The SVG or mxGraph XML code to save. q
autofigure/generator.py:1737
↓ 2 callersFunctionshowErrorToast
(message: React.ReactNode)
frontend/components/chat-input.tsx:38
↓ 2 callersFunctionsubmitFeedback
(messageId: string, value: "good" | "bad")
frontend/components/chat-message-display.tsx:249
↓ 2 callersFunctionupdate_config_from_sdk
Update CONFIG from SDK Config object. Args: sdk_config: autofigure.config.Config object
autofigure/generator.py:57
↓ 2 callersFunctionvalidateMxCellStructure
(xml: string)
frontend/lib/utils.ts:541
↓ 2 callersFunctionvalidate_code_syntax
Validates code syntax based on the output format. Args: code: The code to validate (SVG or mxGraph XML). output_format: 'svg
autofigure/generator.py:1055
↓ 1 callersFunction_call_openai_compatible
Call OpenAI-compatible API (works with bianxie, openrouter, etc.) IMPORTANT: This function requires api_key, model, and base_url to be passe
autofigure/generator.py:154
↓ 1 callersMethod_enhance_with_bianxie
Enhance image using BianXie API. BianXie API format (OpenAI-compatible chat completions): - Endpoint: https://api.bianxie.ai
autofigure/enhancer.py:544
↓ 1 callersMethod_enhance_with_gemini
Enhance image using Google Gemini native API. Gemini API uses a different format than OpenAI-compatible APIs: - URL: {base_u
autofigure/enhancer.py:710
↓ 1 callersMethod_enhance_with_openrouter
Enhance image using OpenRouter API. OpenRouter API format: - Endpoint: https://openrouter.ai/api/v1/chat/completions
autofigure/enhancer.py:626
↓ 1 callersFunction_export_via_playwright
Export mxGraph XML to PNG using Playwright with draw.io embed mode. This mirrors the approach used by next-ai-draw-io (react-drawio componen
autofigure/generator.py:1167
↓ 1 callersMethod_generate_comparison_summary
Generate summary for pairwise comparison.
autofigure/judge.py:1330
↓ 1 callersFunction_generate_image_bianxie
Generate image using BianXie API. BianXie returns images as markdown in content: ![text](data:image/png;base64,...)
backend/autofigure_routes.py:1380
↓ 1 callersFunction_generate_image_gemini
Generate image using Google Gemini API directly. Gemini API uses a different format than OpenAI-compatible APIs: - URL: {base_url}/model
backend/autofigure_routes.py:1620
↓ 1 callersFunction_generate_image_openrouter
Generate image using OpenRouter API. Based on OpenRouter API documentation (https://openrouter.ai/google/gemini-3.1-flash-image-preview/api)
backend/autofigure_routes.py:1464
↓ 1 callersMethod_generate_individual_summary
Generate summary for single figure evaluation.
autofigure/judge.py:1271
↓ 1 callersFunction_get_blog_mxgraphxml_prompt_template
Returns the mxGraph XML prompt template for blog posts.
autofigure/generator.py:541
↓ 1 callersFunction_get_blog_prompt_template
Returns the complex prompt template for blog posts.
autofigure/generator.py:365
↓ 1 callersMethod_get_default_enhancement_model
Get default enhancement model for a provider.
autofigure/config.py:114
↓ 1 callersFunction_get_paper_mxgraphxml_prompt_template
Returns the mxGraph XML prompt template for research papers.
autofigure/generator.py:437
↓ 1 callersFunction_get_paper_prompt_template
Returns the complex prompt template for research papers.
autofigure/generator.py:311
↓ 1 callersFunction_get_survey_mxgraphxml_prompt_template
Returns the mxGraph XML prompt template for survey papers.
autofigure/generator.py:492
↓ 1 callersFunction_get_survey_prompt_template
Returns the complex prompt template for survey papers.
autofigure/generator.py:337
↓ 1 callersFunction_get_textbook_mxgraphxml_prompt_template
Returns the mxGraph XML prompt template for textbook content.
autofigure/generator.py:589
↓ 1 callersFunction_get_textbook_prompt_template
Returns the complex prompt template for textbook content.
autofigure/generator.py:392
↓ 1 callersMethod_read_file_content
Read content from a file based on its type. Args: path: File path Returns: File content as text, or
autofigure/extractor.py:124
↓ 1 callersMethod_read_pdf
Read PDF file content using available libraries. Tries multiple methods in order of preference.
autofigure/extractor.py:153
↓ 1 callersMethod_read_text
Read plain text or markdown file.
autofigure/extractor.py:144
↓ 1 callersMethod_recalculate_overall_score
Recalculate overall_score as the average of all dimension scores.
autofigure/judge.py:716
↓ 1 callersMethod_validate_comparison_format
Validate comparison result format.
autofigure/judge.py:1052
next →1–100 of 374, ranked by callers