quickstart.mdx 3.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. ---
  2. title: '🚀 Quickstart'
  3. description: '💡 Start building LLM powered apps under 30 seconds'
  4. ---
  5. Embedchain is a Data Platform for LLMs - load, index, retrieve, and sync any unstructured data. Using embedchain, you can easily create LLM powered apps over any data.
  6. Install embedchain python package:
  7. ```bash
  8. pip install embedchain
  9. ```
  10. <Tip>
  11. Embedchain now supports OpenAI's latest `gpt-4-turbo` model. Checkout the [FAQs](/get-started/faq#how-to-use-gpt-4-turbo-model-released-on-openai-devday).
  12. </Tip>
  13. Creating an app involves 3 steps:
  14. <Steps>
  15. <Step title="⚙️ Import app instance">
  16. ```python
  17. from embedchain import Pipeline as App
  18. app = App()
  19. ```
  20. <Accordion title="Customize your app by a simple YAML config" icon="gear-complex">
  21. Embedchain provides a wide range of options to customize your app. You can customize the model, data sources, and much more.
  22. Explore the custom configurations [here](https://docs.embedchain.ai/advanced/configuration).
  23. ```python
  24. from embedchain import Pipeline as App
  25. app = App(yaml_config="config.yaml")
  26. ```
  27. </Accordion>
  28. </Step>
  29. <Step title="🗃️ Add data sources">
  30. ```python
  31. app.add("https://en.wikipedia.org/wiki/Elon_Musk")
  32. app.add("https://www.forbes.com/profile/elon-musk")
  33. # app.add("path/to/file/elon_musk.pdf")
  34. ```
  35. <Accordion title="Embedchain supports adding data from many data sources." icon="files">
  36. Embedchain supports adding data from many data sources including web pages, PDFs, databases, and more.
  37. Explore the list of supported [data sources](https://docs.embedchain.ai/data-sources/overview).
  38. </Accordion>
  39. </Step>
  40. <Step title="💬 Ask questions, chat, or search through your data with ease">
  41. ```python
  42. app.query("What is the net worth of Elon Musk today?")
  43. # Answer: The net worth of Elon Musk today is $258.7 billion.
  44. ```
  45. <Accordion title="Want to chat with your app?" icon="face-thinking">
  46. Embedchain provides a wide range of features to interact with your app. You can chat with your app, ask questions, search through your data, and much more.
  47. ```python
  48. app.chat("How many companies does Elon Musk run? Name those")
  49. # Answer: Elon Musk runs 3 companies: Tesla, SpaceX, and Neuralink.
  50. app.chat("What is his net worth today?")
  51. # Answer: The net worth of Elon Musk today is $258.7 billion.
  52. ```
  53. To learn about other features, click [here](https://docs.embedchain.ai/get-started/introduction)
  54. </Accordion>
  55. </Step>
  56. <Step title="🚀 Seamlessly launch your App on the Embedchain Platform!">
  57. ```python
  58. app.deploy()
  59. # 🔑 Enter your Embedchain API key. You can find the API key at https://app.embedchain.ai/settings/keys/
  60. # ec-xxxxxx
  61. # 🛠️ Creating pipeline on the platform...
  62. # 🎉🎉🎉 Pipeline created successfully! View your pipeline: https://app.embedchain.ai/pipelines/xxxxx
  63. # 🛠️ Adding data to your pipeline...
  64. # ✅ Data of type: web_page, value: https://www.forbes.com/profile/elon-musk added successfully.
  65. ```
  66. <Accordion title="Share your app with others" icon="laptop-mobile">
  67. You can now share your app with others from our platform.
  68. Access your app on our [platform](https://app.embedchain.ai/).
  69. </Accordion>
  70. </Step>
  71. </Steps>
  72. Putting it together, you can run your first app using the following Google Colab. Make sure to set the `OPENAI_API_KEY` 🔑 environment variable in the code.
  73. <a href="https://colab.research.google.com/drive/17ON1LPonnXAtLaZEebnOktstB_1cJJmh?usp=sharing">
  74. <img src="https://camo.githubusercontent.com/84f0493939e0c4de4e6dbe113251b4bfb5353e57134ffd9fcab6b8714514d4d1/68747470733a2f2f636f6c61622e72657365617263682e676f6f676c652e636f6d2f6173736574732f636f6c61622d62616467652e737667" alt="Open in Colab" />
  75. </a>