repositories
loading repo index
repositories
loading repo index
repository
loading code, commits, and activity
public Clawd ADK gateway launch mirror
stars
latest
clone command
git clone gitlawb://did:key:z6Mkq5mY...iFZ5/my-project-publ...git clone gitlawb://did:key:z6Mkq5mY.../my-project-publ...2fa351d6docs: add automaton and perps launch sources16d ago| #1 | --- |
| #2 | title: '⚡ Quickstart' |
| #3 | description: '💡 Create an AI app on your own data in a minute' |
| #4 | --- |
| #5 | |
| #6 | ## Installation |
| #7 | |
| #8 | First install the Python package: |
| #9 | |
| #10 | ```bash |
| #11 | pip install embedchain |
| #12 | ``` |
| #13 | |
| #14 | Once you have installed the package, depending upon your preference you can either use: |
| #15 | |
| #16 | <CardGroup cols={2}> |
| #17 | <Card title="Open Source Models" icon="osi" href="#open-source-models"> |
| #18 | This includes Open source LLMs like Mistral, Llama, etc.<br/> |
| #19 | Free to use, and runs locally on your machine. |
| #20 | </Card> |
| #21 | <Card title="Paid Models" icon="dollar-sign" href="#paid-models" color="#4A154B"> |
| #22 | This includes paid LLMs like GPT 4, Claude, etc.<br/> |
| #23 | Cost money and are accessible via an API. |
| #24 | </Card> |
| #25 | </CardGroup> |
| #26 | |
| #27 | ## Open Source Models |
| #28 | |
| #29 | 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. |
| #30 | |
| #31 | 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). |
| #32 | |
| #33 | <CodeGroup> |
| #34 | ```python huggingface_demo.py |
| #35 | import os |
| #36 | # Replace this with your HF token |
| #37 | os.environ["HUGGINGFACE_ACCESS_TOKEN"] = "hf_xxxx" |
| #38 | |
| #39 | from embedchain import App |
| #40 | |
| #41 | config = { |
| #42 | 'llm': { |
| #43 | 'provider': 'huggingface', |
| #44 | 'config': { |
| #45 | 'model': 'mistralai/Mistral-7B-Instruct-v0.2', |
| #46 | 'top_p': 0.5 |
| #47 | } |
| #48 | }, |
| #49 | 'embedder': { |
| #50 | 'provider': 'huggingface', |
| #51 | 'config': { |
| #52 | 'model': 'sentence-transformers/all-mpnet-base-v2' |
| #53 | } |
| #54 | } |
| #55 | } |
| #56 | app = App.from_config(config=config) |
| #57 | app.add("https://www.forbes.com/profile/elon-musk") |
| #58 | app.add("https://en.wikipedia.org/wiki/Elon_Musk") |
| #59 | app.query("What is the net worth of Elon Musk today?") |
| #60 | # Answer: The net worth of Elon Musk today is $258.7 billion. |
| #61 | ``` |
| #62 | </CodeGroup> |
| #63 | |
| #64 | ## Paid Models |
| #65 | |
| #66 | In this section, we will use both LLM and embedding model from OpenAI. |
| #67 | |
| #68 | ```python openai_demo.py |
| #69 | import os |
| #70 | from embedchain import App |
| #71 | |
| #72 | # Replace this with your OpenAI key |
| #73 | os.environ["OPENAI_API_KEY"] = "sk-xxxx" |
| #74 | |
| #75 | app = App() |
| #76 | app.add("https://www.forbes.com/profile/elon-musk") |
| #77 | app.add("https://en.wikipedia.org/wiki/Elon_Musk") |
| #78 | app.query("What is the net worth of Elon Musk today?") |
| #79 | # Answer: The net worth of Elon Musk today is $258.7 billion. |
| #80 | ``` |
| #81 | |
| #82 | # Next Steps |
| #83 | |
| #84 | Now that you have created your first app, you can follow any of the links: |
| #85 | |
| #86 | * [Introduction](/get-started/introduction) |
| #87 | * [Customization](/components/introduction) |
| #88 | * [Use cases](/use-cases/introduction) |
| #89 | * [Deployment](/get-started/deployment) |
| #90 |