Skip to content

Commit

Permalink
docs: app config instead of init config (mem0ai#308)
Browse files Browse the repository at this point in the history
  • Loading branch information
cachho committed Jul 18, 2023
1 parent 1df804e commit 96143ac
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions docs/advanced/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ Here's the readme example with configuration options.
```python
import os
from embedchain import App
from embedchain.config import InitConfig, AddConfig, QueryConfig, ChunkerConfig
from embedchain.config import AppConfig, AddConfig, QueryConfig, ChunkerConfig
from chromadb.utils import embedding_functions

# Example: use your own embedding function
config = InitConfig(ef=embedding_functions.OpenAIEmbeddingFunction(
# Warning: We are currenty reworking the concept of custom apps, this might not be working.
config = AppConfig(ef=embedding_functions.OpenAIEmbeddingFunction(
api_key=os.getenv("OPENAI_API_KEY"),
organization_id=os.getenv("OPENAI_ORGANIZATION"),
model_name="text-embedding-ada-002"
Expand Down
2 changes: 1 addition & 1 deletion docs/advanced/query_configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: '🔍 Query configurations'
---

## InitConfig
## AppConfig

| option | description | type | default |
|-----------|-----------------------|---------------------------------|------------------------|
Expand Down
2 changes: 1 addition & 1 deletion embedchain/apps/OpenSourceApp.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class OpenSourceApp(EmbedChain):

def __init__(self, config: OpenSourceAppConfig = None):
"""
:param config: InitConfig instance to load as configuration. Optional.
:param config: OpenSourceAppConfig instance to load as configuration. Optional.
`ef` defaults to open source.
"""
logging.info("Loading open source embedding model. This may take some time...") # noqa:E501
Expand Down
4 changes: 2 additions & 2 deletions notebooks/embedchain-chromadb-server.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@
"source": [
"import os\n",
"from embedchain import App\n",
"from embedchain.config import InitConfig\n",
"from embedchain.config import AppConfig\n",
"\n",
"\n",
"chromadb_host = \"localhost\"\n",
"chromadb_port = 8000\n",
"\n",
"config = InitConfig(host=chromadb_host, port=chromadb_port)\n",
"config = AppConfig(host=chromadb_host, port=chromadb_port)\n",
"elon_bot = App(config)"
]
},
Expand Down

0 comments on commit 96143ac

Please sign in to comment.