run-llama / llama_parse

Parse files for optimal RAG
https://www.llamaindex.ai
MIT License
1.79k stars 157 forks source link

Use ChatGPT 4o from API call? #214

Open rickymerchant opened 4 weeks ago

rickymerchant commented 4 weeks ago

When previewing LlamaParse, I get the correct output when I select the GPT 4o mode, so I want to use that when calling the Llama_parse API, but it seems there are no options to use this mode when using the standalone API?

maxqper commented 3 weeks ago

Use gpt4o_mode : true.

// sample javascript

    const formData = new FormData();
    formData.append('file', pdfFile);
    if (config.gpt4o_mode) {
      formData.append('gpt4o_mode', 'true');
    }
    const response = await fetch(`${baseUrl}/upload`, {
      method: 'POST',
      headers,
      body: formData
    });