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: ❓ FAQs |
| #3 | description: 'Collections of all the frequently asked questions' |
| #4 | --- |
| #5 | <AccordionGroup> |
| #6 | <Accordion title="Does Embedchain support OpenAI's Assistant APIs?"> |
| #7 | Yes, it does. Please refer to the [OpenAI Assistant docs page](/examples/openai-assistant). |
| #8 | </Accordion> |
| #9 | <Accordion title="How to use MistralAI language model?"> |
| #10 | Use the model provided on huggingface: `mistralai/Mistral-7B-v0.1` |
| #11 | <CodeGroup> |
| #12 | ```python main.py |
| #13 | import os |
| #14 | from embedchain import App |
| #15 | |
| #16 | os.environ["HUGGINGFACE_ACCESS_TOKEN"] = "hf_your_token" |
| #17 | |
| #18 | app = App.from_config("huggingface.yaml") |
| #19 | ``` |
| #20 | ```yaml huggingface.yaml |
| #21 | llm: |
| #22 | provider: huggingface |
| #23 | config: |
| #24 | model: 'mistralai/Mistral-7B-v0.1' |
| #25 | temperature: 0.5 |
| #26 | max_tokens: 1000 |
| #27 | top_p: 0.5 |
| #28 | stream: false |
| #29 | |
| #30 | embedder: |
| #31 | provider: huggingface |
| #32 | config: |
| #33 | model: 'sentence-transformers/all-mpnet-base-v2' |
| #34 | ``` |
| #35 | </CodeGroup> |
| #36 | </Accordion> |
| #37 | <Accordion title="How to use ChatGPT 4 turbo model released on OpenAI DevDay?"> |
| #38 | Use the model `gpt-4-turbo` provided my openai. |
| #39 | <CodeGroup> |
| #40 | |
| #41 | ```python main.py |
| #42 | import os |
| #43 | from embedchain import App |
| #44 | |
| #45 | os.environ['OPENAI_API_KEY'] = 'xxx' |
| #46 | |
| #47 | # load llm configuration from gpt4_turbo.yaml file |
| #48 | app = App.from_config(config_path="gpt4_turbo.yaml") |
| #49 | ``` |
| #50 | |
| #51 | ```yaml gpt4_turbo.yaml |
| #52 | llm: |
| #53 | provider: openai |
| #54 | config: |
| #55 | model: 'gpt-4-turbo' |
| #56 | temperature: 0.5 |
| #57 | max_tokens: 1000 |
| #58 | top_p: 1 |
| #59 | stream: false |
| #60 | ``` |
| #61 | </CodeGroup> |
| #62 | </Accordion> |
| #63 | <Accordion title="How to use GPT-4 as the LLM model?"> |
| #64 | <CodeGroup> |
| #65 | |
| #66 | ```python main.py |
| #67 | import os |
| #68 | from embedchain import App |
| #69 | |
| #70 | os.environ['OPENAI_API_KEY'] = 'xxx' |
| #71 | |
| #72 | # load llm configuration from gpt4.yaml file |
| #73 | app = App.from_config(config_path="gpt4.yaml") |
| #74 | ``` |
| #75 | |
| #76 | ```yaml gpt4.yaml |
| #77 | llm: |
| #78 | provider: openai |
| #79 | config: |
| #80 | model: 'gpt-4' |
| #81 | temperature: 0.5 |
| #82 | max_tokens: 1000 |
| #83 | top_p: 1 |
| #84 | stream: false |
| #85 | ``` |
| #86 | |
| #87 | </CodeGroup> |
| #88 | </Accordion> |
| #89 | <Accordion title="I don't have OpenAI credits. How can I use some open source model?"> |
| #90 | <CodeGroup> |
| #91 | |
| #92 | ```python main.py |
| #93 | from embedchain import App |
| #94 | |
| #95 | # load llm configuration from opensource.yaml file |
| #96 | app = App.from_config(config_path="opensource.yaml") |
| #97 | ``` |
| #98 | |
| #99 | ```yaml opensource.yaml |
| #100 | llm: |
| #101 | provider: gpt4all |
| #102 | config: |
| #103 | model: 'orca-mini-3b-gguf2-q4_0.gguf' |
| #104 | temperature: 0.5 |
| #105 | max_tokens: 1000 |
| #106 | top_p: 1 |
| #107 | stream: false |
| #108 | |
| #109 | embedder: |
| #110 | provider: gpt4all |
| #111 | config: |
| #112 | model: 'all-MiniLM-L6-v2' |
| #113 | ``` |
| #114 | </CodeGroup> |
| #115 | |
| #116 | </Accordion> |
| #117 | <Accordion title="How to stream response while using OpenAI model in Embedchain?"> |
| #118 | You can achieve this by setting `stream` to `true` in the config file. |
| #119 | |
| #120 | <CodeGroup> |
| #121 | ```yaml openai.yaml |
| #122 | llm: |
| #123 | provider: openai |
| #124 | config: |
| #125 | model: 'gpt-4o-mini' |
| #126 | temperature: 0.5 |
| #127 | max_tokens: 1000 |
| #128 | top_p: 1 |
| #129 | stream: true |
| #130 | ``` |
| #131 | |
| #132 | ```python main.py |
| #133 | import os |
| #134 | from embedchain import App |
| #135 | |
| #136 | os.environ['OPENAI_API_KEY'] = 'sk-xxx' |
| #137 | |
| #138 | app = App.from_config(config_path="openai.yaml") |
| #139 | |
| #140 | app.add("https://www.forbes.com/profile/elon-musk") |
| #141 | |
| #142 | response = app.query("What is the net worth of Elon Musk?") |
| #143 | # response will be streamed in stdout as it is generated. |
| #144 | ``` |
| #145 | </CodeGroup> |
| #146 | </Accordion> |
| #147 | |
| #148 | <Accordion title="How to persist data across multiple app sessions?"> |
| #149 | Set up the app by adding an `id` in the config file. This keeps the data for future use. You can include this `id` in the yaml config or input it directly in `config` dict. |
| #150 | ```python app1.py |
| #151 | import os |
| #152 | from embedchain import App |
| #153 | |
| #154 | os.environ['OPENAI_API_KEY'] = 'sk-xxx' |
| #155 | |
| #156 | app1 = App.from_config(config={ |
| #157 | "app": { |
| #158 | "config": { |
| #159 | "id": "your-app-id", |
| #160 | } |
| #161 | } |
| #162 | }) |
| #163 | |
| #164 | app1.add("https://www.forbes.com/profile/elon-musk") |
| #165 | |
| #166 | response = app1.query("What is the net worth of Elon Musk?") |
| #167 | ``` |
| #168 | ```python app2.py |
| #169 | import os |
| #170 | from embedchain import App |
| #171 | |
| #172 | os.environ['OPENAI_API_KEY'] = 'sk-xxx' |
| #173 | |
| #174 | app2 = App.from_config(config={ |
| #175 | "app": { |
| #176 | "config": { |
| #177 | # this will persist and load data from app1 session |
| #178 | "id": "your-app-id", |
| #179 | } |
| #180 | } |
| #181 | }) |
| #182 | |
| #183 | response = app2.query("What is the net worth of Elon Musk?") |
| #184 | ``` |
| #185 | </Accordion> |
| #186 | </AccordionGroup> |
| #187 | |
| #188 | #### Still have questions? |
| #189 | If docs aren't sufficient, please feel free to reach out to us using one of the following methods: |
| #190 | |
| #191 | <Snippet file="get-help.mdx" /> |
| #192 |