Proper Doc
Browse files123445678911121011126 unmodified lines192021222324252617 unmodified lines44454648474849505152535455565729 unmodified lines878889848586878889909192939495969798991001011021031041051061071081091101119091929394117959697989910010112412512612712810210310410515 unmodified lines12112212315012412512612760 unmodified lines188189190217191192193194195196197224225226227228198199200201---license: mit---
# Table of Contents
* [run](#run)* [ChromaDBFlow](#ChromaDBFlow) * [ChromaDBFlow](#ChromaDBFlow.ChromaDBFlow) * [instantiate\_from\_config](#ChromaDBFlow.ChromaDBFlow.instantiate_from_config) * [get\_input\_keys](#ChromaDBFlow.ChromaDBFlow.get_input_keys) * [get\_output\_keys](#ChromaDBFlow.ChromaDBFlow.get_output_keys) * [run](#ChromaDBFlow.ChromaDBFlow.run)* [VectorStoreFlow](#VectorStoreFlow) * [VectorStoreFlow](#VectorStoreFlow.VectorStoreFlow)6 unmodified lines
# run
A simple script to run a Flow that can be used for development and debugging.
<a id="ChromaDBFlow"></a>
# ChromaDBFlow17 unmodified linesdefault parameters of LiteLLMBackend (see aiflows.backends.LiteLLMBackend). Except for the following parameter whose default value is overwritten: - `api_infos` (List[Dict[str, Any]]): The list of api infos. Default: No default value, this parameter is required. - `model_name` (str): The name of the model. Default: "". In the current implementation, this parameter is not used.- `n_results` (int): The number of results to retrieve when reading from the database. Default: 5- `similarity_search_kwargs` (Dict[str, Any]): The parameters to pass to the similarity search method of the ChromaDB. Default: - `k` (int): The number of documents to retrieve. Default: 2 - `filter` (str): The filter to apply to the documents. Default: null- `paths_to_data` (List[str]): The paths to the data to store in the database at instantiation. Default: []- `chunk_size` (int): The size of the chunks to split the documents into. Default: 700- `chunk_overlap` (int): The overlap between the chunks. Default: 0- `persist_directory` (str): The directory to persist the database. Default: "./demo_db_dir"
- Other parameters are inherited from the default configuration of AtomicFlow (see AtomicFlow)
*Input Interface*:29 unmodified lines
`ChromaDBFlow`: The instantiated flow.
<a id="ChromaDBFlow.ChromaDBFlow.get_input_keys"></a>
#### get\_input\_keys
```pythondef get_input_keys() -> List[str]```
This method returns the input keys of the flow.
**Returns**:
`List[str]`: The input keys of the flow.
<a id="ChromaDBFlow.ChromaDBFlow.get_output_keys"></a>
#### get\_output\_keys
```pythondef get_output_keys() -> List[str]```
This method returns the output keys of the flow.
**Returns**:
`List[str]`: The output keys of the flow.
<a id="ChromaDBFlow.ChromaDBFlow.run"></a>
#### run
```pythondef run(input_data: Dict[str, Any]) -> Dict[str, Any]def run(input_message: FlowMessage)```
This method runs the flow. It runs the ChromaDBFlow. It either writes or reads memories from the database.
**Arguments**:
- `input_data` (`Dict[str, Any]`): The input data of the flow.
**Returns**:
`Dict[str, Any]`: The output data of the flow.- `input_message` (`FlowMessage`): The input message of the flow.
<a id="VectorStoreFlow"></a>
15 unmodified lines- `description` (str): A description of the flow. This description is used to generate the help message of the flow.Default: "VectorStoreFlow"- `backend` (Dict[str, Any]): The configuration of the backend which is used to fetch api keys. Default: LiteLLMBackend with thedefault parameters of LiteLLMBackend (see aiflows.backends.LiteLLMBackend). Except for the following parameter whose default value is overwritten:default parameters of LiteLLMBackend (see flows.backends.LiteLLMBackend). Except for the following parameter whose default value is overwritten: - `api_infos` (List[Dict[str, Any]]): The list of api infos. Default: No default value, this parameter is required. - `model_name` (str): The name of the model. Default: "". In the current implementation, this parameter is not used.- `type` (str): The type of the vector store. It can be "chroma" or "faiss". Default: "chroma"60 unmodified lines#### run
```pythondef run(input_data: Dict[str, Any]) -> Dict[str, Any]def run(input_message: FlowMessage)```
This method runs the flow. It either writes or reads memories from the database.
**Arguments**:
- `input_data` (`Dict[str, Any]`): The input data of the flow.
**Returns**:
`Dict[str, Any]`: The output data of the flow.- `input_message` (`FlowMessage`): The input data of the flow.
<a id="__init__"></a>
README.md+15-45