embedchain/docs/get-started/faq.mdx
os.environ["HUGGINGFACE_ACCESS_TOKEN"] = "hf_your_token"
app = App.from_config("huggingface.yaml")
```yaml huggingface.yaml
llm:
provider: huggingface
config:
model: 'mistralai/Mistral-7B-v0.1'
temperature: 0.5
max_tokens: 1000
top_p: 0.5
stream: false
embedder:
provider: huggingface
config:
model: 'sentence-transformers/all-mpnet-base-v2'
import os
from embedchain import App
os.environ['OPENAI_API_KEY'] = 'xxx'
# load llm configuration from gpt4_turbo.yaml file
app = App.from_config(config_path="gpt4_turbo.yaml")
llm:
provider: openai
config:
model: 'gpt-4-turbo'
temperature: 0.5
max_tokens: 1000
top_p: 1
stream: false
import os
from embedchain import App
os.environ['OPENAI_API_KEY'] = 'xxx'
# load llm configuration from gpt4.yaml file
app = App.from_config(config_path="gpt4.yaml")
llm:
provider: openai
config:
model: 'gpt-4'
temperature: 0.5
max_tokens: 1000
top_p: 1
stream: false
from embedchain import App
# load llm configuration from opensource.yaml file
app = App.from_config(config_path="opensource.yaml")
llm:
provider: gpt4all
config:
model: 'orca-mini-3b-gguf2-q4_0.gguf'
temperature: 0.5
max_tokens: 1000
top_p: 1
stream: false
embedder:
provider: gpt4all
config:
model: 'all-MiniLM-L6-v2'
import os
from embedchain import App
os.environ['OPENAI_API_KEY'] = 'sk-xxx'
app = App.from_config(config_path="openai.yaml")
app.add("https://www.forbes.com/profile/elon-musk")
response = app.query("What is the net worth of Elon Musk?")
# response will be streamed in stdout as it is generated.
os.environ['OPENAI_API_KEY'] = 'sk-xxx'
app1 = App.from_config(config={ "app": { "config": { "id": "your-app-id", } } })
app1.add("https://www.forbes.com/profile/elon-musk")
response = app1.query("What is the net worth of Elon Musk?")
```python app2.py
import os
from embedchain import App
os.environ['OPENAI_API_KEY'] = 'sk-xxx'
app2 = App.from_config(config={
"app": {
"config": {
# this will persist and load data from app1 session
"id": "your-app-id",
}
}
})
response = app2.query("What is the net worth of Elon Musk?")
If docs aren't sufficient, please feel free to reach out to us using one of the following methods:
<Snippet file="get-help.mdx" />