Improve docs. (#1096)
This commit is contained in:
12
docs/components/introduction.mdx
Normal file
12
docs/components/introduction.mdx
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
---
|
||||||
|
title: 🧩 Introduction
|
||||||
|
---
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
You can configure following components
|
||||||
|
|
||||||
|
* [Data Source](/components/data-sources/overview)
|
||||||
|
* [LLM](/components/llms)
|
||||||
|
* [Embedding Model](/components/embedding-models)
|
||||||
|
* [Vector Database](/components/vector-databases)
|
||||||
@@ -1,68 +1,82 @@
|
|||||||
---
|
---
|
||||||
title: '⚡ Quickstart'
|
title: '⚡ Quickstart'
|
||||||
description: '💡 Start building ChatGPT like apps in a minute on your own data'
|
description: '💡 Create a RAG app on your own data in a minute'
|
||||||
---
|
---
|
||||||
|
|
||||||
Install python package:
|
## Installation
|
||||||
|
|
||||||
|
First install the python package.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pip install embedchain
|
pip install embedchain
|
||||||
```
|
```
|
||||||
|
|
||||||
Creating an app involves 3 steps:
|
Once you have installed the package, depending upon your preference you can either use:
|
||||||
|
|
||||||
<Steps>
|
<CardGroup cols={2}>
|
||||||
<Step title="⚙️ Import app instance">
|
<Card title="Open Source Models" icon="osi" href="#open-source-models">
|
||||||
```python
|
This includes Open source LLMs like Mistral, Llama, etc.<br/>
|
||||||
from embedchain import App
|
Free to use, and runs locally on your machine.
|
||||||
app = App()
|
</Card>
|
||||||
```
|
<Card title="Paid Models" icon="dollar-sign" href="#paid-models" color="#4A154B">
|
||||||
<Accordion title="Customize your app by a simple YAML config" icon="gear-complex">
|
This includes paid LLMs like GPT 4, Claude, etc.<br/>
|
||||||
Embedchain provides a wide range of options to customize your app. You can customize the model, data sources, and much more.
|
Cost money and are accessible via an API.
|
||||||
Explore the custom configurations [here](https://docs.embedchain.ai/advanced/configuration).
|
</Card>
|
||||||
<CodeGroup>
|
</CardGroup>
|
||||||
```python yaml_app.py
|
|
||||||
from embedchain import App
|
## Open Source Models
|
||||||
app = App.from_config(config_path="config.yaml")
|
|
||||||
```
|
This section gives a quickstart example of using Mistral as the Open source LLM and Sentence transformers as the Open source embedding model. These models are free and run mostly on your local machine.
|
||||||
```python json_app.py
|
|
||||||
from embedchain import App
|
We are using Mistral hosted at Hugging Face, so will you need a Hugging Face token to run this example. Its *free* and you can create one [here](https://huggingface.co/docs/hub/security-tokens).
|
||||||
app = App.from_config(config_path="config.json")
|
|
||||||
```
|
<CodeGroup>
|
||||||
```python app.py
|
```python quickstart.py
|
||||||
from embedchain import App
|
import os
|
||||||
config = {} # Add your config here
|
# replace this with your HF key
|
||||||
app = App.from_config(config=config)
|
os.environ["HUGGINGFACE_ACCESS_TOKEN"] = "hf_xxxx"
|
||||||
```
|
|
||||||
</CodeGroup>
|
from embedchain import App
|
||||||
</Accordion>
|
app = App.from_config("mistral.yaml")
|
||||||
</Step>
|
app.add("https://www.forbes.com/profile/elon-musk")
|
||||||
<Step title="🗃️ Add data sources">
|
app.add("https://en.wikipedia.org/wiki/Elon_Musk")
|
||||||
```python
|
app.query("What is the net worth of Elon Musk today?")
|
||||||
app.add("https://en.wikipedia.org/wiki/Elon_Musk")
|
# Answer: The net worth of Elon Musk today is $258.7 billion.
|
||||||
app.add("https://www.forbes.com/profile/elon-musk")
|
```
|
||||||
# app.add("path/to/file/elon_musk.pdf")
|
```yaml mistral.yaml
|
||||||
```
|
llm:
|
||||||
<Accordion title="Embedchain supports adding data from many data sources." icon="files">
|
provider: huggingface
|
||||||
Embedchain supports adding data from many data sources including web pages, PDFs, databases, and more.
|
config:
|
||||||
Explore the list of supported [data sources](https://docs.embedchain.ai/data-sources/overview).
|
model: 'mistralai/Mistral-7B-v0.1'
|
||||||
</Accordion>
|
embedder:
|
||||||
</Step>
|
provider: huggingface
|
||||||
<Step title="💬 Ask questions, chat, or search through your data with ease">
|
config:
|
||||||
```python
|
model: 'sentence-transformers/all-mpnet-base-v2'
|
||||||
app.query("What is the net worth of Elon Musk today?")
|
```
|
||||||
# Answer: The net worth of Elon Musk today is $258.7 billion.
|
</CodeGroup>
|
||||||
```
|
|
||||||
<hr />
|
## Paid Models
|
||||||
<Accordion title="Want to chat with your app?" icon="face-thinking">
|
|
||||||
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.
|
In this section, we will use both LLM and embedding model from OpenAI.
|
||||||
```python
|
|
||||||
app.chat("How many companies does Elon Musk run? Name those")
|
```python quickstart.py
|
||||||
# Answer: Elon Musk runs 3 companies: Tesla, SpaceX, and Neuralink.
|
import os
|
||||||
app.chat("What is his net worth today?")
|
# replace this with your OpenAI key
|
||||||
# Answer: The net worth of Elon Musk today is $258.7 billion.
|
os.environ["OPENAI_API_KEY"] = "sk-xxxx"
|
||||||
```
|
|
||||||
To learn about other features, click [here](https://docs.embedchain.ai/get-started/introduction)
|
from embedchain import App
|
||||||
</Accordion>
|
app = App()
|
||||||
</Step>
|
app.add("https://www.forbes.com/profile/elon-musk")
|
||||||
</Steps>
|
app.add("https://en.wikipedia.org/wiki/Elon_Musk")
|
||||||
|
app.query("What is the net worth of Elon Musk today?")
|
||||||
|
# Answer: The net worth of Elon Musk today is $258.7 billion.
|
||||||
|
```
|
||||||
|
|
||||||
|
# Next Steps
|
||||||
|
|
||||||
|
Now that you have created your first app, you can follow any of the links:
|
||||||
|
|
||||||
|
* [Introduction](/get-started/introduction)
|
||||||
|
* [Customization](/components/introduction)
|
||||||
|
* [Use cases](/use-cases/introduction)
|
||||||
|
* [Deployment](/get-started/deployment)
|
||||||
10
docs/logo/dark-rt.svg
Normal file
10
docs/logo/dark-rt.svg
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<svg width="1371" height="249" viewBox="0 0 1371 249" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M66.248 1V248.8H158.996V210.214H120.41V148.264H158.996V101.89H120.41V39.94H158.996V1H66.248ZM169.655 1V248.8H223.817V124.9L246.827 248.8H262.403L285.767 124.9V248.8H339.929V1H277.979L254.615 148.264L231.251 1H169.655ZM404.661 210.214V148.264H412.449C416.697 148.264 419.883 151.804 419.883 156.052V202.426C419.883 206.674 416.697 210.214 412.449 210.214H404.661ZM443.955 125.254L443.247 124.9C460.239 124.9 474.399 111.094 474.399 94.102V32.152C474.399 15.16 460.239 1 443.247 1H350.499V248.8H443.247C460.239 248.8 474.399 234.994 474.399 218.002V156.052C474.399 139.06 460.947 125.608 443.955 125.254ZM412.449 101.89H404.661V39.94H412.449C416.697 39.94 419.883 43.48 419.883 47.728V94.102C419.883 98.35 416.697 101.89 412.449 101.89ZM577.421 1H484.673V248.8H577.421V210.214H538.835V148.264H577.421V101.89H538.835V39.94H577.421V1ZM642.242 210.214V39.94H649.676C654.278 39.94 657.464 43.48 657.464 47.728V202.426C657.464 206.674 654.278 210.214 649.676 210.214H642.242ZM711.98 218.002V32.152C711.98 15.16 697.82 1 680.828 1H588.08V248.8H680.828C697.82 248.8 711.98 234.994 711.98 218.002ZM88 164.8H70V182.8H88V164.8Z" fill="white"/>
|
||||||
|
<rect x="17" y="164.8" width="18" height="18" fill="white"/>
|
||||||
|
<rect y="141.8" width="11" height="18" fill="white"/>
|
||||||
|
<rect x="26" y="64.7998" width="30" height="30" fill="white"/>
|
||||||
|
<rect x="1334.52" y="90.3779" width="26.6955" height="26.6955" fill="white"/>
|
||||||
|
<rect x="1360.32" y="133.091" width="10.6782" height="16.0173" fill="white"/>
|
||||||
|
<rect x="1334.52" y="148.219" width="16.0173" height="16.0173" fill="white"/>
|
||||||
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M723 217.646V31.2444C723 14.202 736.847 0 753.889 0H816.023C833.066 0 847.268 14.202 847.268 31.2444V85.5672H792.59V46.8667C792.59 42.6061 789.394 39.0556 784.779 39.0556C780.518 39.0556 777.323 42.6061 777.323 46.8667V202.024C777.323 206.284 780.518 209.835 784.779 209.835C789.394 209.835 792.59 206.284 792.59 202.024V163.323H847.268V217.646C847.268 234.688 833.066 248.535 816.023 248.535H753.889C736.847 248.535 723 234.688 723 217.646ZM856.144 248.535V0H910.467V101.189H925.734V0H980.057V248.535H925.734V147.701H910.467V248.535H856.144ZM1066.34 248.535L1062.79 209.835H1039.36L1035.45 248.535H988.941L1019.83 0H1081.96L1113.21 248.535H1066.34ZM1043.62 163.323H1058.18L1050.72 85.5672L1043.62 163.323ZM1176.06 248.535H1121.74V0H1176.06V248.535ZM1184.84 248.535V0H1239.17L1262.24 124.268V0H1308.76V75.2506H1302.48V101.946H1308.76V153.557H1294.47V169.575H1308.76V248.535H1254.43L1231.35 124.268V248.535H1184.84Z" fill="white"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 2.6 KiB |
10
docs/logo/light-rt.svg
Normal file
10
docs/logo/light-rt.svg
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<svg width="1371" height="249" viewBox="0 0 1371 249" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M66.248 1V248.8H158.996V210.214H120.41V148.264H158.996V101.89H120.41V39.94H158.996V1H66.248ZM169.655 1V248.8H223.817V124.9L246.827 248.8H262.403L285.767 124.9V248.8H339.929V1H277.979L254.615 148.264L231.251 1H169.655ZM404.661 210.214V148.264H412.449C416.697 148.264 419.883 151.804 419.883 156.052V202.426C419.883 206.674 416.697 210.214 412.449 210.214H404.661ZM443.955 125.254L443.247 124.9C460.239 124.9 474.399 111.094 474.399 94.102V32.152C474.399 15.16 460.239 1 443.247 1H350.499V248.8H443.247C460.239 248.8 474.399 234.994 474.399 218.002V156.052C474.399 139.06 460.947 125.608 443.955 125.254ZM412.449 101.89H404.661V39.94H412.449C416.697 39.94 419.883 43.48 419.883 47.728V94.102C419.883 98.35 416.697 101.89 412.449 101.89ZM577.421 1H484.673V248.8H577.421V210.214H538.835V148.264H577.421V101.89H538.835V39.94H577.421V1ZM642.242 210.214V39.94H649.676C654.278 39.94 657.464 43.48 657.464 47.728V202.426C657.464 206.674 654.278 210.214 649.676 210.214H642.242ZM711.98 218.002V32.152C711.98 15.16 697.82 1 680.828 1H588.08V248.8H680.828C697.82 248.8 711.98 234.994 711.98 218.002ZM88 164.8H70V182.8H88V164.8Z" fill="#2A2B4C"/>
|
||||||
|
<rect x="17" y="164.8" width="18" height="18" fill="#2A2B4C"/>
|
||||||
|
<rect y="141.8" width="11" height="18" fill="#2A2B4C"/>
|
||||||
|
<rect x="26" y="64.7998" width="30" height="30" fill="#2A2B4C"/>
|
||||||
|
<rect x="1334.52" y="90.3779" width="26.6955" height="26.6955" fill="#2A2B4C"/>
|
||||||
|
<rect x="1360.32" y="133.091" width="10.6782" height="16.0173" fill="#2A2B4C"/>
|
||||||
|
<rect x="1334.52" y="148.219" width="16.0173" height="16.0173" fill="#2A2B4C"/>
|
||||||
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M723 217.646V31.2444C723 14.202 736.847 0 753.889 0H816.023C833.066 0 847.268 14.202 847.268 31.2444V85.5672H792.59V46.8667C792.59 42.6061 789.394 39.0556 784.779 39.0556C780.518 39.0556 777.323 42.6061 777.323 46.8667V202.024C777.323 206.284 780.518 209.835 784.779 209.835C789.394 209.835 792.59 206.284 792.59 202.024V163.323H847.268V217.646C847.268 234.688 833.066 248.535 816.023 248.535H753.889C736.847 248.535 723 234.688 723 217.646ZM856.144 248.535V0H910.467V101.189H925.734V0H980.057V248.535H925.734V147.701H910.467V248.535H856.144ZM1066.34 248.535L1062.79 209.835H1039.36L1035.45 248.535H988.941L1019.83 0H1081.96L1113.21 248.535H1066.34ZM1043.62 163.323H1058.18L1050.72 85.5672L1043.62 163.323ZM1176.06 248.535H1121.74V0H1176.06V248.535ZM1184.84 248.535V0H1239.17L1262.24 124.268V0H1308.76V75.2506H1302.48V101.946H1308.76V153.557H1294.47V169.575H1308.76V248.535H1254.43L1231.35 124.268V248.535H1184.84Z" fill="#2A2B4C"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 2.6 KiB |
@@ -2,8 +2,8 @@
|
|||||||
"$schema": "https://mintlify.com/schema.json",
|
"$schema": "https://mintlify.com/schema.json",
|
||||||
"name": "Embedchain",
|
"name": "Embedchain",
|
||||||
"logo": {
|
"logo": {
|
||||||
"dark": "/logo/dark.svg",
|
"dark": "/logo/dark-rt.svg",
|
||||||
"light": "/logo/light.svg",
|
"light": "/logo/light-rt.svg",
|
||||||
"href": "https://github.com/embedchain/embedchain"
|
"href": "https://github.com/embedchain/embedchain"
|
||||||
},
|
},
|
||||||
"favicon": "/favicon.png",
|
"favicon": "/favicon.png",
|
||||||
@@ -41,16 +41,6 @@
|
|||||||
"name": "Talk to founders",
|
"name": "Talk to founders",
|
||||||
"icon": "calendar",
|
"icon": "calendar",
|
||||||
"url": "https://cal.com/taranjeetio/ec"
|
"url": "https://cal.com/taranjeetio/ec"
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Join our slack",
|
|
||||||
"icon": "slack",
|
|
||||||
"url": "https://join.slack.com/t/embedchain/shared_invite/zt-22uwz3c46-Zg7cIh5rOBteT_xe1jwLDw"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Join our discord",
|
|
||||||
"icon": "discord",
|
|
||||||
"url": "https://discord.gg/CUU9FPhRNt"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"topbarLinks": [
|
"topbarLinks": [
|
||||||
@@ -61,7 +51,7 @@
|
|||||||
],
|
],
|
||||||
"topbarCtaButton": {
|
"topbarCtaButton": {
|
||||||
"name": "Join our slack",
|
"name": "Join our slack",
|
||||||
"url": "https://join.slack.com/t/embedchain/shared_invite/zt-22uwz3c46-Zg7cIh5rOBteT_xe1jwLDw"
|
"url": "https://embedchain.ai/slack"
|
||||||
},
|
},
|
||||||
"primaryTab": {
|
"primaryTab": {
|
||||||
"name": "Documentation"
|
"name": "Documentation"
|
||||||
@@ -70,35 +60,23 @@
|
|||||||
{
|
{
|
||||||
"group": "Get Started",
|
"group": "Get Started",
|
||||||
"pages": [
|
"pages": [
|
||||||
"get-started/introduction",
|
|
||||||
"get-started/quickstart",
|
"get-started/quickstart",
|
||||||
|
"get-started/introduction",
|
||||||
|
"get-started/faq",
|
||||||
{
|
{
|
||||||
"group": "🔗 Integrations",
|
"group": "🔗 Integrations",
|
||||||
"pages": [
|
"pages": [
|
||||||
"integration/langsmith",
|
"integration/langsmith",
|
||||||
"integration/chainlit",
|
"integration/chainlit",
|
||||||
"integration/streamlit-mistral"
|
"integration/streamlit-mistral"
|
||||||
]
|
]
|
||||||
},
|
}
|
||||||
"get-started/faq"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"group": "Deployment",
|
|
||||||
"pages": [
|
|
||||||
"get-started/deployment",
|
|
||||||
"deployment/fly_io",
|
|
||||||
"deployment/modal_com",
|
|
||||||
"deployment/render_com",
|
|
||||||
"deployment/streamlit_io",
|
|
||||||
"deployment/gradio_app",
|
|
||||||
"deployment/huggingface_spaces",
|
|
||||||
"deployment/embedchain_ai"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"group": "Use cases",
|
"group": "Use cases",
|
||||||
"pages": [
|
"pages": [
|
||||||
|
"use-cases/introduction",
|
||||||
"use-cases/chatbots",
|
"use-cases/chatbots",
|
||||||
"use-cases/question-answering",
|
"use-cases/question-answering",
|
||||||
"use-cases/semantic-search"
|
"use-cases/semantic-search"
|
||||||
@@ -107,9 +85,11 @@
|
|||||||
{
|
{
|
||||||
"group": "Components",
|
"group": "Components",
|
||||||
"pages": [
|
"pages": [
|
||||||
|
"components/introduction",
|
||||||
{
|
{
|
||||||
"group": "Data sources",
|
"group": "Data sources",
|
||||||
"pages": [
|
"pages": [
|
||||||
|
|
||||||
"components/data-sources/overview",
|
"components/data-sources/overview",
|
||||||
{
|
{
|
||||||
"group": "Data types",
|
"group": "Data types",
|
||||||
@@ -143,6 +123,19 @@
|
|||||||
"components/embedding-models"
|
"components/embedding-models"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"group": "Deployment",
|
||||||
|
"pages": [
|
||||||
|
"get-started/deployment",
|
||||||
|
"deployment/fly_io",
|
||||||
|
"deployment/modal_com",
|
||||||
|
"deployment/render_com",
|
||||||
|
"deployment/streamlit_io",
|
||||||
|
"deployment/gradio_app",
|
||||||
|
"deployment/huggingface_spaces",
|
||||||
|
"deployment/embedchain_ai"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"group": "Community",
|
"group": "Community",
|
||||||
"pages": [
|
"pages": [
|
||||||
@@ -240,6 +233,9 @@
|
|||||||
"posthog": {
|
"posthog": {
|
||||||
"apiKey": "phc_PHQDA5KwztijnSojsxJ2c1DuJd52QCzJzT2xnSGvjN2",
|
"apiKey": "phc_PHQDA5KwztijnSojsxJ2c1DuJd52QCzJzT2xnSGvjN2",
|
||||||
"apiHost": "https://app.embedchain.ai/ingest"
|
"apiHost": "https://app.embedchain.ai/ingest"
|
||||||
|
},
|
||||||
|
"ga4": {
|
||||||
|
"measurementId": "G-4QK7FJE6T3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"feedback": {
|
"feedback": {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
title: 'Chatbots'
|
title: '🤖 Chatbots'
|
||||||
---
|
---
|
||||||
|
|
||||||
Chatbots, especially those powered by Large Language Models (LLMs), have a wide range of use cases, significantly enhancing various aspects of business, education, and personal assistance. Here are some key applications:
|
Chatbots, especially those powered by Large Language Models (LLMs), have a wide range of use cases, significantly enhancing various aspects of business, education, and personal assistance. Here are some key applications:
|
||||||
|
|||||||
11
docs/use-cases/introduction.mdx
Normal file
11
docs/use-cases/introduction.mdx
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
---
|
||||||
|
title: 🧱 Introduction
|
||||||
|
---
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
You can use embedchain to create the following usecases:
|
||||||
|
|
||||||
|
* [Chatbots](/use-cases/chatbots)
|
||||||
|
* [Question Answering](/use-cases/question-answering)
|
||||||
|
* [Semantic Search](/use-cases/semantic-search)
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
title: 'Question Answering'
|
title: '❓ Question Answering'
|
||||||
---
|
---
|
||||||
|
|
||||||
Utilizing large language models (LLMs) for question answering is a transformative application, bringing significant benefits to various real-world situations. Embedchain extensively supports tasks related to question answering, including summarization, content creation, language translation, and data analysis. The versatility of question answering with LLMs enables solutions for numerous practical applications such as:
|
Utilizing large language models (LLMs) for question answering is a transformative application, bringing significant benefits to various real-world situations. Embedchain extensively supports tasks related to question answering, including summarization, content creation, language translation, and data analysis. The versatility of question answering with LLMs enables solutions for numerous practical applications such as:
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
---
|
||||||
|
title: '🔍 Semantic Search'
|
||||||
|
---
|
||||||
|
|
||||||
Semantic searching, which involves understanding the intent and contextual meaning behind search queries, is yet another popular use-case of RAG. It has several popular use cases across various domains:
|
Semantic searching, which involves understanding the intent and contextual meaning behind search queries, is yet another popular use-case of RAG. It has several popular use cases across various domains:
|
||||||
|
|
||||||
- **Information Retrieval**: Enhances search accuracy in databases and websites
|
- **Information Retrieval**: Enhances search accuracy in databases and websites
|
||||||
|
|||||||
Reference in New Issue
Block a user