Improve manuals (#19)
* Rename Admin -> Resources * Improve ui * Update docs
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
# Package overview
|
||||
# Contributing
|
||||
|
||||
## Package overview
|
||||
|
||||
`kotaemon` library focuses on the AI building blocks to implement a RAG-based QA application. It consists of base interfaces, core components and a list of utilities:
|
||||
|
||||
@@ -47,14 +49,14 @@ mindmap
|
||||
Documentation Support
|
||||
```
|
||||
|
||||
# Common conventions
|
||||
## Common conventions
|
||||
|
||||
- PR title: One-line description (example: Feat: Declare BaseComponent and decide LLM call interface).
|
||||
- [Encouraged] Provide a quick description in the PR, so that:
|
||||
- Reviewers can quickly understand the direction of the PR.
|
||||
- It will be included in the commit message when the PR is merged.
|
||||
|
||||
# Environment caching on PR
|
||||
## Environment caching on PR
|
||||
|
||||
- To speed up CI, environments are cached based on the version specified in `__init__.py`.
|
||||
- Since dependencies versions in `setup.py` are not pinned, you need to pump the version in order to use a new environment. That environment will then be cached and used by your subsequence commits within the PR, until you pump the version again
|
||||
@@ -65,7 +67,7 @@ mindmap
|
||||
- When you want to run the CI, push a commit with the message containing `[ignore cache]`.
|
||||
- Once the PR is final, pump the version in `__init__.py` and push a final commit not containing `[ignore cache]`.
|
||||
|
||||
# Merge PR guideline
|
||||
## Merge PR guideline
|
||||
|
||||
- Use squash and merge option
|
||||
- 1st line message is the PR title.
|
||||
|
@@ -1,10 +1,12 @@
|
||||
# Data & Data Structure Components
|
||||
|
||||
The data & data structure components include:
|
||||
|
||||
- The `Document` class.
|
||||
- The document store.
|
||||
- The vector store.
|
||||
|
||||
### Data Loader
|
||||
## Data Loader
|
||||
|
||||
- PdfLoader
|
||||
- Layout-aware with table parsing PdfLoader
|
||||
@@ -22,11 +24,11 @@ The data & data structure components include:
|
||||
- "page_label": page number in the original PDF document
|
||||
```
|
||||
|
||||
### Document Store
|
||||
## Document Store
|
||||
|
||||
- InMemoryDocumentStore
|
||||
|
||||
### Vector Store
|
||||
## Vector Store
|
||||
|
||||
- ChromaVectorStore
|
||||
- InMemoryVectorStore
|
||||
|
@@ -1,4 +1,4 @@
|
||||
Utilities detail can be referred in the sub-pages of this section.
|
||||
# Utilities
|
||||
|
||||
## Prompt engineering UI
|
||||
|
||||
@@ -36,7 +36,7 @@ done by the developers, while step 7 happens exclusively in Excel file).
|
||||
|
||||
Command:
|
||||
|
||||
```
|
||||
```shell
|
||||
$ kotaemon promptui export <module.path.piplineclass> --output <path/to/config/file.yml>
|
||||
```
|
||||
|
||||
@@ -59,38 +59,32 @@ Declared as above, and `param1` will show up in the config YAML file, while `par
|
||||
|
||||
developers can further edit the config file in this step to get the most suitable UI (step 4) with their tasks. The exported config will have this overall schema:
|
||||
|
||||
```
|
||||
```yml
|
||||
<module.path.pipelineclass1>:
|
||||
params:
|
||||
... (Detail param information to initiate a pipeline. This corresponds to the pipeline init parameters.)
|
||||
inputs:
|
||||
... (Detail the input of the pipeline e.g. a text prompt. This corresponds to the params of `run(...)` method.)
|
||||
outputs:
|
||||
... (Detail the output of the pipeline e.g. prediction, accuracy... This is the output information we wish to see in the UI.)
|
||||
logs:
|
||||
... (Detail what information should show up in the log.)
|
||||
params: ... (Detail param information to initiate a pipeline. This corresponds to the pipeline init parameters.)
|
||||
inputs: ... (Detail the input of the pipeline e.g. a text prompt. This corresponds to the params of `run(...)` method.)
|
||||
outputs: ... (Detail the output of the pipeline e.g. prediction, accuracy... This is the output information we wish to see in the UI.)
|
||||
logs: ... (Detail what information should show up in the log.)
|
||||
```
|
||||
|
||||
##### Input and params
|
||||
|
||||
The inputs section have the overall schema as follow:
|
||||
|
||||
```
|
||||
```yml
|
||||
inputs:
|
||||
<input-variable-name-1>:
|
||||
component: <supported-UI-component>
|
||||
params: # this section is optional)
|
||||
value: <default-value>
|
||||
<input-variable-name-2>:
|
||||
... # similar to above
|
||||
<input-variable-name-2>: ... # similar to above
|
||||
params:
|
||||
<param-variable-name-1>:
|
||||
... # similar to those in the inputs
|
||||
<param-variable-name-1>: ... # similar to those in the inputs
|
||||
```
|
||||
|
||||
The list of supported prompt UI and their corresponding gradio UI components:
|
||||
|
||||
```
|
||||
```python
|
||||
COMPONENTS_CLASS = {
|
||||
"text": gr.components.Textbox,
|
||||
"checkbox": gr.components.CheckboxGroup,
|
||||
@@ -107,7 +101,7 @@ COMPONENTS_CLASS = {
|
||||
|
||||
The outputs are a list of variables that we wish to show in the UI. Since in Python, the function output doesn't have variable name, so output declaration is a little bit different than input and param declaration:
|
||||
|
||||
```
|
||||
```yml
|
||||
outputs:
|
||||
- component: <supported-UI-component>
|
||||
step: <name-of-pipeline-step>
|
||||
@@ -125,7 +119,7 @@ where:
|
||||
|
||||
The logs show a list of sheetname and how to retrieve the desired information.
|
||||
|
||||
```
|
||||
```yml
|
||||
logs:
|
||||
<logname>:
|
||||
inputs:
|
||||
@@ -143,7 +137,7 @@ logs:
|
||||
|
||||
Command:
|
||||
|
||||
```
|
||||
```shell
|
||||
$ kotaemon promptui run <path/to/config/file.yml>
|
||||
```
|
||||
|
||||
|
Reference in New Issue
Block a user