Proper Doc
Browse files1234567891011121314156 unmodified lines22232425262717 unmodified lines4546474849505129 unmodified lines8182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013115 unmodified lines14714814915015115215360 unmodified lines214215216217218219220221222223224225226227228229230231---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 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- 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]```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.<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:- `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]```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.<a id="__init__"></a>1234567891011126 unmodified lines192021222324252617 unmodified lines444546474849505152535455565729 unmodified lines8788899091929394959697989910010110210310410515 unmodified lines12112212312412512612760 unmodified lines188189190191192193194195196197198199200201---license: mit---# Table of Contents* [run](#run)* [ChromaDBFlow](#ChromaDBFlow)* [ChromaDBFlow](#ChromaDBFlow.ChromaDBFlow)* [instantiate\_from\_config](#ChromaDBFlow.ChromaDBFlow.instantiate_from_config)* [run](#ChromaDBFlow.ChromaDBFlow.run)* [VectorStoreFlow](#VectorStoreFlow)* [VectorStoreFlow](#VectorStoreFlow.VectorStoreFlow)6 unmodified lines# runA 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.- `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.run"></a>#### run```pythondef run(input_message: FlowMessage)```This method runs the flow. It runs the ChromaDBFlow. It either writes or reads memories from the database.**Arguments**:- `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 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_message: FlowMessage)```This method runs the flow. It either writes or reads memories from the database.**Arguments**:- `input_message` (`FlowMessage`): The input data of the flow.<a id="__init__"></a>
README.md+15-45