Selaa lähdekoodia

docs: app config instead of init config (#308)

cachho 2 vuotta sitten
vanhempi
commit
96143ac496

+ 3 - 2
docs/advanced/configuration.mdx

@@ -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"

+ 1 - 1
docs/advanced/query_configuration.mdx

@@ -2,7 +2,7 @@
 title: '🔍 Query configurations'
 ---
 
-## InitConfig
+## AppConfig
 
 | option    | description           | type                            | default                |
 |-----------|-----------------------|---------------------------------|------------------------|

+ 1 - 1
embedchain/apps/OpenSourceApp.py

@@ -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

+ 2 - 2
notebooks/embedchain-chromadb-server.ipynb

@@ -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)"
    ]
   },