text-file.mdx 344 B

1234567891011121314
  1. ---
  2. title: '📄 Text file'
  3. ---
  4. To add a .txt file, specify the data_type as `text_file`. The URL provided in the first parameter of the `add` function, should be a local path. Eg:
  5. ```python
  6. from embedchain import App
  7. app = App()
  8. app.add('path/to/file.txt', data_type="text_file")
  9. app.query("Summarize the information of the text file")
  10. ```